Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
(Close) Beginner Questions
  • Hello everyone

    My setting:
      Win7 and WampServer Version 2.2

    I have a little problem with "Oil refine migrate" it returns me an error "invalid data source name in COREPATH / classes / database / pdo / connection.php" I do not understand my mistake ...

    Thanks in advance
  • I'm going to take a swing at this offhand(but it'd be helpful to have more information):

    "oil r migrate" runs database migrations.  Is this what you're trying to do?

    Do you have a database properly setup/connected in the db.config files in fuel/app/config?
  • @BigTone Thank you very much for replying to my message =)

    Setting to config\development\db.php (return array(
        'default' => array(
            'connection'  => array(
                'dsn'        => 'mysql:host=127.0.0.1;dbname=db',
                'username'   => 'root',
                'password'   => '',
            ),
        ),
    );


    And
    my bootstrap.php (Fuel :: DEVELOPMENT)

  • And you have a MySQL server running on 127.0.0.1? With a defined database called 'db'?
  • @Harro Wow Fast reply Ty ..

    I tried with localhost always the same error for dbname i changed for example



  • Most be something in your local configuration.

    Since you're using 'development', and that is the default for Oil, that should not be the issue too.

    Just to check, if you change the config to this, will it work?

    return array(
        'default' => array(
            'type'            => 'mysqli',
            'connection'    => array(
                'hostname'   => 'localhost',
                'database'   => 'db',
                'username'   => 'root',
                'password'   => '',
                'persistent' => false,
            ),
            'identifier'   => '`',
            'table_prefix' => '',
            'charset'      => 'utf8',
            'caching'      => false,
            'profiling'    => false,
        ),

    to rule out a PDO issue?

    It could also be the blank password, I'm not sure a blank password is the same as NO password. I have never used MySQL without a password, so I don't know if this might be the issue.
  • I install the script on a virtual machine (ubuntu 12.04) and everything works

    Thank you for your help

Howdy, Stranger!

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

In this Discussion