Last Updated: February 25, 2016
·
3.998K
· jruzafa

Pipe viewer import mysql database

$ pv /path/to/sqlfile.sql | mysql -uUSERNAME -pPASSWORD -D DATABASE_NAME

Picture

This display progress bar and remaining time during the import database process.

1 Response
Add your response

i like it. How to redirect the output to a file?

pv /path/to/sqlfile.sql | mysql -uUSERNAME -pPASSWORD -D DATABASENAME > log.txt 2> errorlog.txt

not work.

over 1 year ago ·