Display a MySQL Import Progress Bar

Last modified: 
Sunday, March 29th, 2015
Topics: 
MySQL

If you are restoring large databases in Mysql, it can be nice to have a guesstimate of how much longer the process is likely to take. The following command will create a progress bar and estimate of how much time is left for the restore.

pv -i 1 -p -t -e PATH_TO_SQL_FILE | mysql -u USER_NAME -pUSER_PASSWORD DATABASE

References

mysqldump - How far along is the importation of my MySQL dump? - Stack Overflow


The operator of this site makes no claims, promises, or guarantees of the accuracy, completeness, originality, uniqueness, or even general adequacy of the contents herein and expressly disclaims liability for errors and omissions in the contents of this website.