Topic: PHP wont connect to mysql.
Im running Apache/2.2.3 and PHP/5.1.6, but PHP wont connect to MySQL.
phpmyadmin says this: #2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)
But in php.ini the default mysql socket is set to /var/lib/mysql/mysql.sock. Also, i can connect to mysql via cmd line.
See:
[root@host php-5.1.6]# mysql -u root -p mysql
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 5.0.22
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
It was working, until i recompiled PHP to have GD enabled. :\ (GD works now, but MySQL doesnt, and it is enabled).
http://host.uploadit.biz/phpinfo.php
^^PHP Info