Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.