Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Database Foundations Securing and Maintaining a MySQL Database Backing up and Restoring Databases

Restore of backup doesn't work

I'm following this video to create backup.sql, and it works. Here is how the commend line looks:

18:28:40 Dumping treehouse_movie_db (all tables)

Running:

mysqldump.exe --defaults-extra-file="c:\users\arsena~1\appdata\local\temp\tmp1idbib.cnf"  --user=root --max_allowed_packet=1G --host=localhost --port=3306 --default-character-set=utf8 "treehouse_movie_db"

18:28:41 Export of C:\Users\arsenalchem\Desktop\backup.sql has finished

I then tried to restore it following the instructions in the video. Although the commend line says import has finished, nothing (i.e. treehouse_movie_db_clone) has shown up (even after I clicked refresh button in the schema navigation bar).

Here is how command line looks: 18:31:00 Restoring C:\Users\arsenalchem\Desktop\backup.sql

Running:

mysql.exe --defaults-extra-file="c:\users\arsena~1\appdata\local\temp\tmpp5zufp.cnf"  --host=localhost --user=root --port=3306 --default-character-set=utf8 --comments --database=treehouse_movie_db < "C:\\Users\\arsenalchem\\Desktop\\backup.sql"

18:31:01 Import of C:\Users\arsenalchem\Desktop\backup.sql has finished

Anyone could give me a hint why this happens? Thank you very much in advance.

For some reason, it works now. I think probably because I did not save the backup sql file after I changed database name to sth_clone.