Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Task vs. Controller Action
  • I'm running into issues using my Models and even core classes like the DB class in a task I'm building. When I try to run DB::list_tables() it gives me this
    Error: mysql_connect(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in /Users/jon/Sites/fuel/fuel/core/classes/database/mysql/connection.php on 73
    Although it works as expected in my controller.
  • figured out the problem with help from jschreuder and philsturgeon in the irc Basically for CLI you have to use '127.0.0.1' as the hostname for your database config http://scrp.at/MG On a final note, I am using MAMP, and there is an option to "Allow local access only" that you need to uncheck to work if you are also using MAMP for local development.
  • Or you can create a symbolic link like this: $ sudo mkdir /var/mysql
    $ sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock

Howdy, Stranger!

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

In this Discussion