On OSX, when I try to use the following:
resources.db.adapter = "pdo_mysql" resources.db.params.dbname = "myDb" resources.db.params.host = "localhost" resources.db.params.username = "root" resources.db.params.password = ""
I get the following error
Warning: PDO::__construct(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in /Library/WebServer/sites/testweb/library/Zend/Db/Adapter/Pdo/Abstract.php on line 129 Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] No such file or directory' in /Library/WebServer/sites/testweb/library/Zend/Db/Adapter/Pdo/Abstract.php:129 Stack trace:
If I add: 3306, then it works
resources.db.params.host = "localhost:3306"
However, then Windows machines have connection problems.
Is there a way to connect OSX only to the default localhost mysql port?
source share