How to see the process of importing a SQL file?

In order to see the process of importing SQL files, I use the Pipe Viewer utility.
Pipe Viewer is very useful especially when the SQL file is large, allows you to roughly estimate the remaining time before the import of the file is completed, displays the import process in percent and the time passed.

You can install the Pipe Viewer in Ubuntu/Debian using the command:

sudo apt install pv

In Fedora:

yum install pv

Suppose earlier we imported a sql file and did not see the process:

mysql -u root DATABASE_NAME < dump.sql

Now, to see the process, we will perform the import using the Pipe Viewer:

pv dump.sql | mysql -u root DATABASE_NAME
Подписаться на IT Blog (RU) по Email
Subscribe to IT Blog (EN) by Email

Did my article help you? How about buying me a cup of coffee as an encouragement? Buy me a coffe.

Leave a Reply