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

后端 未结 7 1165
-上瘾入骨i
-上瘾入骨i 2021-02-05 01:34

is this right?

mysql -uroot -ppassword mydb < myfile.sql.gz
7条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-05 02:28

    Use the following command:

    gunzip < databasefile.sql.gz | mysql -u root -p dbname
    

提交回复
热议问题