PDA

View Full Version : Could not connect to MySQL server!


crypted
27th October 2007, 05:55
Allright, someone was running a conversion script with PHP on the server. Suddenly, the system goes nuts. Now, after rebooting ISPConfig I get "Could not connect to MySQL server!"

I checked the config.inc.php and the username and password are correct. I also rebooted MYSQL into mysqld_safe and executed the following to ensure it was right:
UPDATE user SET password=PASSWORD("password") WHERE user="root";
FLUSH PRIVILEGES;

There were no modified rows and I exited.

The log files aren't telling me anything.

After entering my username and password at the ISPConfig interface, I get the following:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in /home/admispconfig/ispconfig/lib/classes/ispconfig_db_mysql.lib.php on line 77

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'admispconfig'@'localhost' (using password: NO) in /home/admispconfig/ispconfig/web/login/login.php on line 40

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/admispconfig/ispconfig/web/login/login.php on line 40

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'admispconfig'@'localhost' (using password: NO) in /home/admispconfig/ispconfig/web/login/login.php on line 41

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/admispconfig/ispconfig/web/login/login.php on line 41

Warning: Cannot modify header information - headers already sent by (output started at /home/admispconfig/ispconfig/lib/classes/ispconfig_db_mysql.lib.php:77) in /home/admispconfig/ispconfig/web/login/login.php on line 60

Other mysql database driven sites seem to be up and running. They can be accessed and are loading properly.

Ideas? Thanks so much; You all really need a PayPal donate button.

crypted
27th October 2007, 06:33
Okay, it can connect to the database IF the config.inc.php has a specific IP instead of "localhost" mentioned. However, all other databases can be accessed directly through "localhost" for mysql. What's up with that???

till
27th October 2007, 12:51
Have a look in the users table of the mysql database, I guess there is no permission record for the user specified in config.inc.php and the hostname localhost, or the password for this login combination is not correct.

Did you update your mysql version from 4.0.x to a version >= 4.1.x?