How to implement MySQL dump / restore control panel?

I'm having problems using the built-in MySQL reporting method to dump to a file.

According to this , the patch was fixed in mysqldump.exe more than a year ago, which will print progress on the command line on so many lines if mysqldump was called with the --verbose and --show_progress_size parameters. However, when I run the command

mysqldump -u <user> -p<password> --verbose --show_progress_size <database_name> > "C:\thingy.sql" 

I get an error message below:

 mysqldump: unknown option '--show_progress_size' 

I could not find an entry to remove this option from mysqldump. I am using MySQL community server version 5.1.58, with mysqldump in Version 10.13.

If this feature is really removed, I’m looking for a way to implement an accurate progress bar for dumps and restores.

+6
source share
1 answer

It seems that version 10.13 of mysqldump was released in 2009 or earlier (to verify this, find ā€œ10.13ā€ in this error report and look at the corresponding version of MySQL) and is still used in the latest version of MySQL. Therefore, the patch is probably not yet released. It might be worth a try upgrading the current version of MySQL.

I understand that you are using Windows. If I am wrong and you are working on Linux, you can read the dump file using pv :

 pv --bytes --eta --progress dump_file | mysql --some-option 

This will give you some kind of progress bar, although it sometimes lags behind. Unfortunately, I have not yet been able to use pv when dropping a file, but perhaps this information will help you anyway.

+7
source

Source: https://habr.com/ru/post/905635/


All Articles