mysqldump Lost connection to MySQL server during query when dumping table

When taking backup of a MySQL database, i got error root@server1:~# mysqldump –opt serverok_wp > serverok_wp.sql mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table `wp_options` at row: 60831 root@server1:~# This error happens when connection between your MySQL client and server is timing out during the mysqldump process. To fix, increase … Read more

mysqldump errno: 24 Can’t open file when using LOCK TABLES

When backing up a MySQL database using mysqldump command, I got the following error. root@server12:~# mysqldump –opt DB_NAME > DB_NAME.sql mysqldump: Got error: 1016: Can’t open file: ‘./DB_NAME/TABLE_NAME.frm’ (errno: 24) when using LOCK TABLES root@server12:~# The error is due to open_files_limit mysql> show variables like ‘open_files_limit’; +——————+——-+ | Variable_name | Value | +——————+——-+ | open_files_limit … Read more

Split mysqldump backup file into tables

MySQL

I had to restore a large MySQL backup file. When restoring one of the table resulted in error. To debug the error, i wanted to split the MySQL backup taken using mysqldump into tables. You can use csplit command to do this csplit -s -ftable MYSQLDUMP_BACKUP_FILE_HERE “/– Table structure for table/” {*} This will generate … Read more

mysqldump

mysqldump is a command used to backup MySQL databases. To take backup, run To backup with triggers, routines, and events –opt combines many options. It is same as adding –add-drop-table, –add-locks, –create-options, –disable-keys, –extended-insert, –lock-tables, –quick, and –set-charset. –extended-insert option will group together all INSERT operations for a table. This makes the backup file smaller … Read more