One night I had to restore my entire SQL database server from a SQL file, but it took me a while to find how to restore this file without restoring specific databases.
Below are the commands for Linux.
If you have shell (command-line) access, use MySQL to import the files directly. You can do this by issuing the “source” command:
$su –
Password:
# mysql -u-p source
Once you have entered the password to your MySQL username, the restoration process will soon begin.