CakePHP 'Cake is NOT able to connect to the database'
- by kand
I've looked at this post about a similar issue:
CakePHP: Can't access MySQL database
and I've tried everything they mentioned in there including:
Changing my database.php so that the 'port' attribute for both $default and $test are the location of my mysqld.sock file
Changing the 'port' attribute to the actual integer that represents the port in my my.cnf mysql config
Changing the mysql socket locations in php.ini to the location of my mysqld.sock file
I'm using ubuntu 11.04, apache 2.2.17, mysql 5.1.54, and CakePHP 1.3.10. My install of mysql and apache don't seem to match any conventions, as in, all the config files are there, they are all just in really weird places--I'm not sure why that is, but I've tried reinstalling both programs multiple times with the same results...
At any rate, I can log into mysql from the terminal and use it normally, and apache is working because I can see the CakePHP default homepage. I just can't get it to change the message 'Cake is NOT able to connect to the database'.
SOLVED: Figured it out, had to change php.ini so that extension_dir pointed to the correct directory and had to add a line extension=mysql.so.