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

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

is this right?

mysql -uroot -ppassword mydb < myfile.sql.gz
7条回答
  •  眼角桃花
    2021-02-05 02:26

    • You must not use the password directly in the terminal, use without it like follows
    zcat YOUR_FILE.sql.gz | mysql -u YOUR_DB_USERNAME -p YOUR_DATABASE_NAME
    
    • Hit enter and when terminal asked for your password, type your password and hope everything will work fine.

提交回复
热议问题