Error establishing a database connection on OS X 10.5
-
Hello All,
First, I have done a ton of searching on this topic and I see that I’m not the only one having issues. Unfortunately, I have spent far too much time on this and I’m still scratching my head.I am using a fresh install of OS X Leopard, I have PHP 5.2.4 running, MySQL 5.0.51a MySQL Community Server running on top of OS X’s pre-installed Apache. I can parse PHP, and I can connect to my local MySQL server via command line. I installed phpMyAdmin, and that’s running smoothly locally as well (phpMyAdmin is able to connect read/write to/from MySQL).
I keep getting the “Error establishing a database connection” page when I hit my local wp site. I have a fresh install of WordPress, with a double-triple-checked wp-config.php file. Configured as follows:
define('DB_NAME', 'dbname'); // The name of the database define('DB_USER', 'root@localhost'); // Your MySQL username define('DB_PASSWORD', 'xxx'); // ...and password define('DB_HOST', 'localhost'); // 99% chance you won't need to change this valu
e
I tried changing the ‘DB_HOST’ designation to my machine’s IP, this did not work as well.
I have also re-assigned the mysql.default_socket php.ini:
mysql.default_socket = /tmp/mysql.sock
Additionally, the my.cnf file:
[mysqld] socket=/var/mysql/mysql.soc
I have tried restarting all services, re-installing all services (besides apache), and, well, I’m starting to lose hope! I have done wp installs a gazillion times, but never ever had an issue like this!!!! Someone please help! Any smart suggestions are greatly appreciated!
- The topic ‘Error establishing a database connection on OS X 10.5’ is closed to new replies.