Skip to content

Instantly share code, notes, and snippets.

@chiragmongia
Created February 22, 2013 11:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chiragmongia/5012782 to your computer and use it in GitHub Desktop.
Save chiragmongia/5012782 to your computer and use it in GitHub Desktop.
$ mysqldump -uroot -p exercise1 > newbackup.sql;
Enter password:
mysql>create database restored;
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| exercise1 |
| mysql |
| newstudent |
| performance_schema |
| restored |
| student |
| vtapp |
+--------------------+
mysql> use exercise1;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+---------------------+
| Tables_in_exercise1 |
+---------------------+
| branch |
| holdings |
| locations |
| sandwiches |
| tastes |
| titles |
+---------------------+
$ mysql -uroot -p restored < newbackup.sql;
mysql> use restored;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+--------------------+
| Tables_in_restored |
+--------------------+
| branch |
| holdings |
| locations |
| sandwiches |
| tastes |
| titles |
+--------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment