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.