MySQL Basics In Pictures
Restore databases
  1. Type:

    CREATE DATABASE us_presidents;

    then press ENTER.

    The database has been restored, but is empty. There are no tables or data in it.
  2. Type:

    \q;

    then press ENTER.

    This closes the MySQL client connection.

    You are closing the connection so you can use a Linux command line pipe ( > ) to restore the database.
  3. Type:

    mysql -u root -p us_presidents < ./backups/us_presidents.sql

    then press ENTER.

    This restores the data in the database us_presidents from the backup.