MySQL Offline and Website Offline

Status
Not open for further replies.

rlodge

Member
Messages
230
Reaction score
0
Points
16
For the last couple of days I have been getting this error message when attempting to access my website:

Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 111 in /home/rlodge/public_html/framework/class.database.php on line 61
Lost connection to MySQL server at 'reading initial communication packet', system error: 111

I checked the config.php for my website and here is what I have for the database:

define('DB_HOST', 'localhost.x10hosting.com');

I have the same thing for my forum and neither that nor my chat application are able to connect to the database either.

I went to my cPanel and saw that MySQL was offline (in another thread an account manager said that was because of a firewall).

I looked in the server alerts and only saw a reboot message for Absolut (the server I am hosted on) so is there a problem with MySQL on Absolut or is there a message I missed telling me to change settings on my site?

Thank You

I also noticed on my account management panel that the server shows in the red for a server load of 12.25.
 
Last edited:

Fedlerner

Former Adm & Team Manager
Community Support
Messages
12,934
Reaction score
6
Points
38
DB_HOST should be 'localhost', and not 'localhost.x10hosting.com'.
MySQL is not actually offline. MySQL blocks external connections, so the status script shows MySQL as offline.
 

rlodge

Member
Messages
230
Reaction score
0
Points
16
Thank you very much. Those settings have been like that for quite a while and everything worked. I don't know what changed but changing the db to "localhost" fixed it all.

Thanks for the quick response.
 
Last edited:
Status
Not open for further replies.
Top