command-line fixes linux SQL

Restoring entire SQL Database from file

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.

Leave a Reply

Discover more from Daniel Bs Tech Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading