Mobile app version of vmapp.org
Login or Join
Si4351233

: Virtualmin cannot connect to MySQL database I have a VPS running Webmin/Virtualmin. I host multiple domains, one of which is a Drupal 7 website that uses a MySQL database. Yesterday I went to

@Si4351233

Posted in: #Centos #Database #Error #Mysql #Webmin

I have a VPS running Webmin/Virtualmin. I host multiple domains, one of which is a Drupal 7 website that uses a MySQL database. Yesterday I went to 'Manage' the database and found that I recieved the following error Lost connection to MySQL server during query and that I can't access it in anyway. I wondered whether it was because my version of MySQL was out of date (it is 5.1.17) so before updated, I tried to back up the database by going to Webmin >> Servers >> MySQL Database Server >> Backup Databases - only to receive the following page:


Database backup failed : mysqldump failed :

mysqldump: Got error: 2013: Lost connection to MySQL server during
query when using LOCK TABLES Database backup failed : mysqldump failed
:

mysqldump: Got error: 2002: Can't connect to local MySQL server
through socket '/var/lib/mysql/mysql.sock' (111) when trying to
connect Database backup failed : mysqldump failed :

mysqldump: Got error: 2002: Can't connect to local MySQL server
through socket '/var/lib/mysql/mysql.sock' (2) when trying to connect
Successfully backed up 1348 bytes from database test to file
/home/test.sql.

Scheduled backup for database left disabled.


I have set 'Allow big tables?' to Yes and the maximum packet size to 5 MB in the MySQL Server Configuration but I still receive the errors. The file size of the database is only 156 MB, it has 190 tables and it is likely to hold much more data than it does now.

Does anyone have any advice? I'm running CentOS.

UPDATE: Since posting this question, I have been in contact with my hosting company who advised be to upgrade MySQL. I'm now running version 5.5.38 and have exactly the same problem. I installed the latest version of phpMyAdmin and have some strange behaviour. When I try to view the database, it says that the session has timed out but when I log back in no databases appear and I'm told that there are no tables in the database I just clicked on.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Si4351233

1 Comments

Sorted by latest first Latest Oldest Best

 

@Nimeshi995

I found these resources that may help. They explain the errors rather well and what to do about them.

Got error: 2013: Lost connection...

stackoverflow.com/questions/10563619/error-code-2013-lost-connection-to-mysql-server-during-query https://serverfault.com/questions/29597/what-does-mysql-error-2013-mean dev.mysql.com/doc/refman/5.0/en/error-lost-connection.html

Got error: 2002: Can't connect to...

stackoverflow.com/questions/11657829/error-2002-hy000-cant-connect-to-local-mysql-server-through-socket-var-run https://dba.stackexchange.com/questions/46296/mysql-works-mysqldump-doesnt


It sounds like these are fairly simple configuration issues. I hope this helps.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme