Reputation:
after a clean install of Fuel, I set the database configuration in the app config file, but after I run oil refine migrate I get
fuelphp oil refine migrate Error - invalid data source name in COREPATH/classes/database/pdo/connection.php on line 87
this problem just started happening and I have no idea what's wrong. it's not the settings in the config file....
Upvotes: 0
Views: 1455
Reputation: 1727
This error happens when a connection couldn't be established. In some cases you'll need to have the the host set to 127.0.0.1
, this all depends on your dev setup.
If you're running MAMP you can also alias the MySQL socket like so:
$ sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock
As the troubleshooting section describes sometimes you need to create the MySQL directory first:
$ sudo mkdir /var/mysql
$ sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock
Upvotes: 1
Reputation: 81
I had this problems as well, but I found out that it's caused by the missing PDO extension in php-cli.ini, I am using UniformServer, after I added that in the config it worked. You should check if you have config for php cli.
Upvotes: 2