mysql access loss
I made zero changes. Wasn't even in the server by SSH or ftp. Just viewing the pages through firefox.
I booted into my backup copy of my linode server, and everything works perfectly. I have no idea what could have instantaneously changed in my primary server to kill the connection, and am having no luck restoring it.
Is there any solution I can try, so I don't have to roll back to a backup that isn't as current as I would like?
Thank you.
2 Replies
You can manually check on your Linode whether your MySQL server is running and accepting connections using your webapp's credentials like so:
$ mysql --user=yourusername --pass=yourpassword
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 5.0.24a-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| foo |
| test |
+--------------------+
3 rows in set (0.10 sec)
Where yourusername and yourpassword can be found in your webapp's config somewhere.
The only other likely cause I can think of would be a firewall rule blocking access to port 3306. Possibly if you have some intrusion detection system set up, perhaps something set it off and caused it to block the port.
You could filter for mysql messages by running 'grep mysql /var/log/syslog' to strip out uninteresting messages about other services running on the server.
Otherwise you could just try and restart mysql or even reboot the machine rather than a restoration from backup which should be pretty last resort.
Reading logs is your friend, this sort of thing is what they're there for