Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Configuring fuel to use your database
  • I was wondering how exactly would we set up fuel to use a database that I have created on my own localhost mysql server. I've created a database called placement in my localhost mysql server. I've done the following so far: In fuel/core/classes/database/mysql/connection.php, I entered the following information :
    extract($this->_config + array(
    'database' => 'placement',
    'hostname' => 'localhost',
    'username' => 'myusername',
    'password' => 'mypassword',
    'persistent' => FALSE,
    )); I've also done the following : protected static $_current_databases = array('placement'); Any ideas?
  • Hello, actually you do not have to dig into the core clas...
    Just open the fuel/app/config/db.php - and edit it. Should be easy enought! Good luck
  • Huglester is right, it's that easy. On a side note, if you are on Mac OS X, use '127.0.0.1' instead of 'localhost', a tip I originally got from Phil Sturgeon.
  • You never edit anything in core/ directory!!! P.S. If you need to... you can extend one (or more) of core classes... but never edit them!

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion