Use the following command to import a MySQL database into an existing database on the server:
mysql -u USERNAME -p LOCALDATABASE < IMPORTFILE.sql
Working example for user “admin”, local database “foo” and import file “foo_backup.sql”:
mysql -u admin -p foo < foo_backup.sql