* Home :: Get a random password :: Get a multi-word password :: What is my IP? (v4 | v6)
* My projects

Monitor MySQL imports with pv

Tags: howto

When importing large MySQL dumps it's useful to get an idea of progress and ETA. The utility `pv` can do this.

Here's an example:

pv dump.sql | mysql -uUser -pPassword Database

And here's an example of how to import a gzipped dump:

pv dump.sql.gz | zcat | mysql -uUser -pPassword Database

The output should look something like this:

[root@localhost ~]# pv /root/mysqldump.sql.gz | zcat | mysql -uroot -pPassword Database
83.5MiB 0:01:50 [1.04MiB/s] [=============================================================================>                                                                                                                 ] 41% ETA 0:02:34

(c)The Nux(tm) ;-)

No CSS, no Javascript, no some HTML.
No ads, no tracking, no cookies.