No edit summary |
No edit summary |
||
Line 19: | Line 19: | ||
|- | |- | ||
|- | |- | ||
| Check load on database server using '''''top''''' | |Check mysqld service '''''service mysqld status''''' | ||
|- | |||
|Check load on database server using '''''top''''' | |||
|- | |- | ||
|Check the ports using '''''nmap -Pn localhost''''' | |Check the ports using '''''nmap -Pn localhost''''' | ||
Line 25: | Line 27: | ||
|Check the ports from remote using '''''nmap -Pn databasehost''''' | |Check the ports from remote using '''''nmap -Pn databasehost''''' | ||
|- | |- | ||
|Check | |||
|Check the logging '''''less /var/log/mysql.log''''' | |||
|- | |- | ||
| | |Try to login locally on the database server '''''mysql -u root -p''''' | ||
|- | |- | ||
| Try to login | |Try to login from the remote host '''''mysql -h databasehost -u dbusername -p''''' | ||
|- | |- | ||
! Fixing (you might kill | ! Fixing (you might kill the webserver/application first, perhaps pause the monitoring) | ||
|- | |- | ||
| Restart mysql service '''''service mysqld restart''''' | |Restart mysql service '''''service mysqld restart''''' | ||
|- | |- | ||
|Follow the logging '''''tail -f /var/log/mysql.log''''' | |Follow the logging '''''tail -f /var/log/mysql.log''''' |
Revision as of 20:34, 16 April 2020
Template structure
Issue description |
---|
How to troubleshoot it |
How to fix it |
Template Example
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 mysqld service service mysqld status |
Check load on database server using top |
Check the ports using nmap -Pn localhost |
Check the ports from remote using nmap -Pn databasehost |
Check the logging less /var/log/mysql.log |
Try to login locally on the database server mysql -u root -p |
Try to login from the remote host mysql -h databasehost -u dbusername -p |
Fixing (you might kill the webserver/application first, perhaps pause the monitoring) |
Restart mysql service service mysqld restart |
Follow the logging tail -f /var/log/mysql.log |
Check mysql service service mysqld status |