No edit summary |
No edit summary |
||
Line 13: | Line 13: | ||
|- | |- | ||
| Check if mysqld is running and if the ports are available on the localhost and from the host you try to connect from. See if the service is running and if you can connect locally. This should usually provide some info to start troubleshooting from. | | Check if mysqld is running and if the ports are available on the localhost and from the host you try to connect from. See if the service is running and if you can connect locally. This should usually provide some info to start troubleshooting from. | ||
|- | |||
! Actions | |||
|- | |- | ||
|- | |- |
Revision as of 20:25, 16 April 2020
Issue description |
---|
How to troubleshoot it |
How to fix it |
Cannot connect to database |
---|
Check if mysqld is running and if the ports are available on the localhost and from the host you try to connect from. See if the service is running and if you can connect locally. This should usually provide some info to start troubleshooting from. |
Actions |
Check load on database server using top |
Check the ports using nmap -Pn localhost |
Check the ports from remote using nmap -Pn databasehost |
Check mysql service service mysqld status |
Check the logging less /var/log/mysql.log |
Try to login locally on the database server mysql -u root -p |
Fixing (you might kill your webserver/application first) |
Restart mysql service service mysqld restart |