is this right?
mysql -uroot -ppassword mydb < myfile.sql.gz
Not, it isn't, the right would be:
zcat myfile.sql.gz | mysql -u root -p password mydb
tar -xzf myfile.tar.gz
Check the extracted sql files using: ls
mysql -u root -p password database < myfile.sql