Mysqldump backing up a database is a simple and convenient method, but it also consumes a certain amount of memory. But then again, the database of which work does not consume memory, if not consume memory to complete the management of the DBA that is not the DBA that is God-the great God. Said some to find who frequently contradicted words, if you find with me to carry that will not need, you win. Oh! Let's get to the chase.
Today, when making a database backup with the Mysqldump tool, I reported an error: "Got error:2013:lost connection to MySQL server during query time using lock tables" on the Internet. Half a day has not found a similar problem situation. So I Dmitri Trenin through the words of the problem to study, this problem has two points,
The first one is lost connection this is a link to the MySQL database, which is related to the parameter wait_timeout,connect_timeout, but looks at the show global variables like '% connection% '; Show global status like '%connection% '; no unusual phenomenon found. So the study
2nd lock tables, by viewing show global variables like ' innodb_table_locks '; Also did not find a locked table, so think of once read an article (forget which article) there is such a paragraph: when the database table corresponding to the file corruption or loss when accessing the table, the system will report an error: The table does not exist or the database is broken link. Therefore, from the data file to find the table file is missing or only a single file, after it is backed up, moved out. When you run mysqldump again, the execution passes.
Because of the relatively busy so simple record, for themselves and the user to follow up the problem of access to information.
This article from the "10675043" blog, reproduced please contact the author!
Use mysqldump to back up the database times got error:2013 error