HomeMySQLMost common MySQL errors and fixes

Most common MySQL errors and fixes

Error #1

"Starting MySQL. ERROR! Manager of pid-file quit without updating file."

Solution: If you’re getting the above error while starting mysql, check the mysql error log by using the following command:

tail -f /var/lib/mysql/*.err

Here you can see the reason. Issue maybe due to the presence of incorrect variables existing in ‘/etc/my.cnf’.

Error #2

"Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)"

Solution: Make sure that /var/lib/mysql/mysql.sock is existing. Also, confirm the presence of /tmp/mysql.sock. If it’s not existing, create it:

ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock 

Then restart mysql.

Error #3

ERROR 2003 (HY000): Can't connect to MySQL server on 'IP address is here' (110) 

Solution: Open port 3306 in server firewall. If iptables is the firewall, use the following command:

iptables -A INPUT -m tcp -p tcp --sport 3306 -j ACCEPT
iptables -A INPUT -m tcp -p tcp --dport 3306 -j ACCEPT
service iptables save
service iptables restart

Error #4

When Plesk login page return some errors

Solution: Disable ‘skip-bdb’ in /etc/my.cnf and then restart mysql.

Error #5

database.table_name
Error : Incorrect file format 'table_name'
error : Corrupt

Solution: If you’re getting the above error while executing ‘mysqlcheck’, try to repair the table manually.

# mysql -u root -p
mysql > use database_name;
mysql > repair table table_name;

If the issue is not solved, try the following command:

mysql > repair table table_name USE_FRM;

It will fix the issue.

One of the most misleading errors generated by MySql is shown below:-

"error    : sort_buffer_size is to small
warning  : Number of rows changed from 0 to 14024"

In this case, you need to adjust both ‘sort_buffer_size’ and ‘myisam_sort_buffer_size’.

Scroll to Top