This is my first installation of the framework, and I'm pretty clueless.
I'm on OSX 10.7 and I have a cakephp platform loaded in /Library/WebServer/Documents/cakephp and I was able to load a test page and get rid of some errors and warnings. Now I am trying to solve this problem.
Warning (2): PDO::__construct() [pdo.--construct]: [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) [CORE/Cake/Model/Datasource/Database/Mysql.php, line 160] Cake is NOT able to connect to the database. Database connection "SQLSTATE[HY000] [2002] No such file or directory" is missing, or could not be created.
I really don't know what to do here. I installed MySQL. Is MySQL PDO installed on OSX by default? or do i need to install this? How can I check if this is installed if this is a problem.
UPDATE:
Mysql PDO driver is included. Also phpinfo() for pro_mysql looks like this:
Directive Local Value Master Value pdo_mysql.default_socket /var/mysql/mysql.sock /var/mysql/mysql.sock
However, the mysql directory does not appear on my file system. should i create it? or do I want to change this path somewhere?
UPDATE: I think the problem is that I did not actually create the database. I do not want to configure the database.
I think I'll try to figure it out now.
UPDATE:
What finally solved this was that the cake was looking for a Unix socket in the database in /var/mysql/mysql.sock , but mysql used the socket in /tmp/mysql.sock I fixed this by creating a symlink from /var/mysql/mysql.sock to /tmp/mysql.sock .
source share