mysql - u user_name -p your_password database_name < file_name.sql
Or using our example from the previous page:
mysql - u bobbyjoe -p happy234 BobsData < BobBackup.sqlIf your database already exists and you are just restoring it, try this line instead:
mysqlimport -u user_name -p your_password database_name file_name.sql
Or using our example again:
mysqlimport -u bobbyjoe -p happy234 BobsData BobBackup.sql

