How do I load a sql.gz file to my database?

How do i load a sql.gz file to my database?

Asked on January 26, 2021 in MySQL.

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.

In Debian/Ubuntu apt-get install pv.

on January 26, 2021.
Add Comment
1 Answer(s)
gunzip < myfile.sql.gz | mysql -u root -p mydb
Answered on January 26, 2021.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.