No, it isn't. The right way would be
zcat myfile.sql.gz | mysql -u root -ppassword mydb
Note there can be no space between the -p
and password
if using the -p syntax, refer http://dev.mysql.com/doc/refman/5.5/en/mysql-command-options.html#option_mysql_password