Skip to main content
Added backup tag since mysqldump performs backups
Link
RolandoMySQLDBA
  • 184.3k
  • 33
  • 323
  • 531
Added innodb tag because the mysqldump is doing single transaction dump
Link
RolandoMySQLDBA
  • 184.3k
  • 33
  • 323
  • 531
Tweeted twitter.com/#!/StackDBAs/status/343368828853579776
added 17 characters in body; edited title
Source Link
Mat
  • 10.2k
  • 4
  • 43
  • 40

mysqldump was blocked atfreezing on a specific table

I dumped a database (sys_data) which is very big (800GB, all data in one ibdata file) from a remote server. But the dump was blocked at a table (tb_trade_376). My dump command:

mysqldump -uxx -pxx -h192.168.1.xxx --single-transcation sys_data > /home/sys_data.sql
mysqldump -uxx -pxx -h192.168.1.xxx --single-transcation sys_data > /home/sys_data.sql

When the dump was blocked:

show processlist;
5306612 | root | 192.168.1.161:57180 | sys_data | Query   | 23955 | Sending data | SELECT /*!40001 SQL_NO_CACHE */ * FROM `tb_trade_376`
show processlist;
5306612 | root | 192.168.1.161:57180 | sys_data 
   | Query  | 23955 | Sending data | SELECT /*!40001 SQL_NO_CACHE */ * FROM `tb_trade_376`

On the other hand I can dump the table tb_trade_376 successfully if I just dump the table only.

mysqldump -uxx -pxx -h192.168.1.xxx --single-transcation sys_data tb_trade_376 > /home/tb_trade_376.sql
mysqldump -uxx -pxx -h192.168.1.xxx \
  --single-transcation sys_data tb_trade_376 > /home/tb_trade_376.sql

This works well and quickly! The table tb_trade_376 has about 700,000-800,000 rows.

What is the next step in investigating why I can't dump the whole database? How can I make it work?

mysqldump was blocked at a table

I dumped a database (sys_data) which is very big (800GB, all data in one ibdata file) from a remote server. But the dump was blocked at a table (tb_trade_376). My dump command:

mysqldump -uxx -pxx -h192.168.1.xxx --single-transcation sys_data > /home/sys_data.sql

When the dump was blocked:

show processlist;
5306612 | root | 192.168.1.161:57180 | sys_data | Query   | 23955 | Sending data | SELECT /*!40001 SQL_NO_CACHE */ * FROM `tb_trade_376`

On the other hand I can dump the table tb_trade_376 successfully if I just dump the table only.

mysqldump -uxx -pxx -h192.168.1.xxx --single-transcation sys_data tb_trade_376 > /home/tb_trade_376.sql

This works well and quickly! The table tb_trade_376 has about 700,000-800,000 rows.

What is the next step in investigating why I can't dump the whole database? How can I make it work?

mysqldump freezing on a specific table

I dumped a database (sys_data) which is very big (800GB, all data in one ibdata file) from a remote server. But the dump was blocked at a table (tb_trade_376). My dump command:

mysqldump -uxx -pxx -h192.168.1.xxx --single-transcation sys_data > /home/sys_data.sql

When the dump was blocked:

show processlist;
5306612 | root | 192.168.1.161:57180 | sys_data 
   | Query  | 23955 | Sending data | SELECT /*!40001 SQL_NO_CACHE */ * FROM `tb_trade_376`

On the other hand I can dump the table tb_trade_376 successfully if I just dump the table only.

mysqldump -uxx -pxx -h192.168.1.xxx \
  --single-transcation sys_data tb_trade_376 > /home/tb_trade_376.sql

This works well and quickly! The table tb_trade_376 has about 700,000-800,000 rows.

What is the next step in investigating why I can't dump the whole database? How can I make it work?

Post Migrated Here from stackoverflow.com (revisions)
Source Link
罗俊峰
罗俊峰
Loading