Mysqldump Error 2013 Lost Connection
Contents |
to: mysqldump: Error 2013: Lost connection to MySQL
Error 2013: Lost Connection To Mysql Server
server during query when dumping table ....If so there mysqldump: got error: 2013: lost connection to mysql server during query when using lock tables are several options you can try to resolve: 1) it is possible that the mysqldump net_write_timeout backup is hitting the MySQL timeout limits. The particular variables in question here are net_read_timeout and net_write_timeout which are set to 30
Mysqldump Connection Timeout
and 60 seconds respectivley. You can change these in the my.cnf config file by setting them as you desire. Here is an example. After making these changes to my.cnf you must restart MySQL net_read_timeout = 120 net_write_timeout = 900 If you prefer to change these settings
Net_read_timeout Mysql
without needing to reboot MySQL you can do that with the following SQL statements: set global net_read_timeout = 120; set global net_write_timeout = 900; Again, use the value for these settings that you feel is appropriate for your setup. 2) Increase max_allowed_packet setting You might try increasing the max_allowed_packet configuration setting. You could try setting it to 256M or even up to 1G 3) You could have a corrupt table Sometimes "Lost connection" errors are caused by a corrupt table. You could try setting innodb_force_recovery = 1 and restart mysql to see if that helps. If it does, doing the dump might fix the page cache in which you can often turn this back to 0 or remove. Was this article helpful? Yes / No, I want to contact support Powered by Groove
2014 20:41 Reporter: - - Email Updates: Status: No Feedback Impact on me: None Category:MySQL Server: InnoDB storage mysql lost connection engine Severity:S3 (Non-critical) Version:5.5.37 OS:Linux (Ubuntu 14.04) Assigned to: View Add
Mysqldump Skip Table
Comment Files Developer Edit Submission View Progress Log Contributions [3 May 2014 3:09] - - Description: mysqldump quick I tried to backup my database with the mysqldump command. But it failed with an error message, "mysqldump: Error 2013: Lost connection to MySQL server during query https://ottomatik.groovehq.com/knowledge_base/topics/solving-error-2013-lost-connection-to-mysql-server-during-query-when-dumping-table when dumping table `creation_log` at row: 59655". The log of mysqldump was: ======================================== nodchip@nighthawk ~ % mysqldump -uroot -p[password] -A -v --flush-privileges --rou tines --result-file mysql_backup_2014-05-03.sql (skipped) -- Retrieving table structure for table creation_log... -- Sending SELECT query... -- Retrieving rows... mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table `creation_log` https://bugs.mysql.com/bug.php?id=72519 at row: 59655 ======================================== I added "innodb_force_recovery = 6" to [mysqld] section in my.cnf, restart the mysqld and tried mysqldump again. But the result was not changed. The definition of "creation_log" table is: ======================================== mysql> desc creation_log; +------------+------------------+------+-----+-------------------+-----------------------------+ | Field | Type | Null | Key | Default | Extra | +------------+------------------+------+-----+-------------------+-----------------------------+ | PROBLEM_ID | int(10) unsigned | NO | MUL | NULL | | | USER_CODE | int(10) unsigned | NO | | NULL | | | DATE | timestamp | NO | MUL | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP | | MACHINE_IP | text | NO | MUL | NULL | | | SUMMARY | text | YES | | NULL | | +------------+------------------+------+-----+-------------------+-----------------------------+ ======================================== I tried "ALTER TABLE
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies http://stackoverflow.com/questions/27868343/error-2013-in-mysql-export-database of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask https://xenforo.com/community/threads/mysqldump-error-2013-lost-connection-to-mysql-server-during-query.63256/ Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign lost connection up Error 2013 in MySQL export database up vote 0 down vote favorite my MySQL server was working fine, but today I can't connect to this. I get the error "Can't connect to mysql server on 'localhost' (10061)". So I check that the Mysql55 service in my Windows 7 x64 is stopped. I start the service, but when I open a specifically 2013: lost connection database the server stops. With other databases I don't have any problem. I try to dump the database to a .sql file and I get the error "mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table table_name at row: 43795". Then the server stops. I try this Error Code: 2013. Lost connection to MySQL server during query but not works. When I try to export the database in other times, I get the same error, but with a different row value. mysql database share|improve this question asked Jan 9 '15 at 20:04 Josecanalla 691210 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote It seems while dumping the particular table sending receiving too large data from that table . use --max_allowed_packet=500M and then dump it..also check your my.ini config file max_allowed_packet variable size you have specified . share|improve this answer answered Jan 9 '15 at 20:21 Selva 14 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Passwo
connection to MySQL server during query Discussion in 'General PHP and MySQL Discussions' started by ARSamo, Nov 15, 2013. ARSamo Member Hi, When I wana copying xenforo_db to newxenforo_db for testing purpose using putty following ssh command: Code: mysqldump -uDB_user -p=DB_pass -hDB_host xenforo_db | mysql -uDB_user -pDB_pass -hDB_host newxenforodb Initially i got max_allowed_ packet error... after googling i changed the command as : Code: mysqldump --opt -max_allowd_packet=1G -uDB_user -p=DB_pass -hDB_host xenforo_db | mysql -uDB_user -pDB_pass -hDB_host newxenforodb and this time i got the error: mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table `xf_post` at row: 334751Click to expand... The numbers are always different in each error log. I am confused how to change net_write_timeout and net_read_ timeout using ssh. i have godaddy shared hosting Can anyone help? ARSamo, Nov 15, 2013 #1 ARSamo Member ARSamo, Nov 16, 2013 #2 MattW Well-Known Member Rather than piping it straight into a new DB, why not just output the DB to a file, and then re-import separately? mysqldump --opt -max_allowd_packet=1G -uDB_user -p=DB_pass -hDB_host xenforo_db > db.sql mysql -uDB_user -pDB_pass -hDB_host newxenforodb < db.sql MattW, Nov 16, 2013 #3 ARSamo likes this. ARSamo Member MattW said: ↑ Rather than piping it straight into a new DB, why not just output the DB to a file, and then re-import separately? mysqldump --opt -max_allowd_packet=1G -uDB_user -p=DB_pass -hDB_host xenforo_db > db.sql mysql -uDB_user -pDB_pass -hDB_host newxenforodb < db.sqlClick to expand... Thanks @MattW for reply... in this case i received following error: Code: ERROR 1034 (HY000) at line 3209: 22 when fixing table My sourceDb has 151 tables but when i backup & restore through godaddy built-in db import export procedure.. every time only 94 tables were restored... I have also made ticket t