1

My database is 8GB

When I run the database backup bash script, there is the warning/failure. They have appeared since 1 month ago

Here are my warning/failure

mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table `xxx` at row: 427348 mysqldump: Couldn't execute 'SELECT engine, table_type FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = DATABASE() AND table_name = 'xxx'': MySQL server has gone away (2006) mysqldump: Couldn't execute 'SET SQL_QUOTE_SHOW_CREATE=1': MySQL server has gone away (2006) ..... mysqldump: Couldn't execute 'UNLOCK TABLES': MySQL server has gone away (2006) mysqldump: Got error: 2002: "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)" when trying to connect 
1
  • What in the server log corresponds to this client message? What it is doing that time? Commented May 26, 2022 at 10:53

2 Answers 2

1

The Error 2013: Lost connection to MySQL server and MySQL server has gone away (2006) errors always mean that the connection between the program and the database was broken unexpectedly. Usually this happens due to the connection being killed by something, server running out of memory or due to a bug that ends up crashing the server process.

To find out what actually caused this, inspect the server error logs which by default is /var/lib/mysql/hostname.err.

1
  • there isn't any file .err in my server. I searched it Commented Jun 1, 2022 at 10:23
0

If the server is not restarting for some reason, adding --quick --single-transaction to mysqldump may help.

1
  • Can you guide me more detail? I am newbie :( Commented Jun 1, 2022 at 10:24

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.