mysql import database from file system code example Example: import mysql db zcat /path/to/file.sql.gz | mysql -u 'root' -p your_database