Enter your email address to subscribe to this blog and receive notifications of new posts by email.
Join 1 other subscriber
How do i load a sql.gz file to my database?
To display a progress bar while importing a sql.gz file, download pv and use the following:
pv mydump.sql.gz | gunzip | mysql -u root -p <database name>
In CentOS/RHEL, you can install pv with yum install pv.
yum install pv
In Debian/Ubuntu apt-get install pv.
apt-get install pv
gunzip < myfile.sql.gz | mysql -u root -p mydb