I'm trying to import a gzipped SQL file into mysql directly. Is this the right way?
mysql -uroot -ppassword mydb > myfile.sql.gz
databasegzipimportMySQL
I'm trying to import a gzipped SQL file into mysql directly. Is this the right way?
mysql -uroot -ppassword mydb > myfile.sql.gz
Best Answer
>
will write the output of themysql
command onstdout
into the filemyfile.sql.gz
which is most probably not what you want. Additionally, this command will prompt you for the password of the MySQL user "root".