No edit summary  | 
				No edit summary  | 
				||
| Line 14: | Line 14: | ||
| Check if mysqld is running and if the ports are available on the localhost and from the host you try to connect from.    | | Check if mysqld is running and if the ports are available on the localhost and from the host you try to connect from.    | ||
|-  | |-  | ||
| Check load on database server using ''top''  | | Check load on database server using '''''top'''''  | ||
|-  | |-  | ||
|Check the ports using ''nmap -Pn localhost''  | |Check the ports using '''''nmap -Pn localhost'''''  | ||
|-  | |-  | ||
|Check the ports from remote using ''nmap -Pn databasehost''  | |Check the ports from remote using '''''nmap -Pn databasehost'''''  | ||
|-  | |-  | ||
|Check the logging ''less /var/log/mysql.log''  | |Check the logging '''''less /var/log/mysql.log'''''  | ||
|-  | |-  | ||
! Fixing  | ! Fixing  | ||
|-  | |-  | ||
| Restart mysql service ''service mysqld restart''  | | Restart mysql service '''''service mysqld restart'''''  | ||
|}  | |}  | ||
Revision as of 19:17, 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. | 
| 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 | 
| Fixing | 
| Restart mysql service service mysqld restart | 
