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 trialJessica Rudder
2,778 PointsDatabase Foundations - Backing Up and Restoring Databases
[EDIT: Found the issue. I had updated the name of the database to "treehouse_movie_db_clone" for the CREATE DATABASE command but not for the USE command. Updating in both locations solved the issue.]
Hello!
I went through the backup process outline in the video (using MySQL Workbench).
The file appears to have exported correctly and lists the various tables that were present in the original schema. The only change I made to the backup was to edit the CREATE DATABASE IF NOT EXISTS treehouse_movie_db
line to CREATE DATABASE IF NOT EXISTS treehouse_movie_db_clone
(as discussed in the video).
The import claimed to be successful:
09:01:50 PM Restoring /home/jessica/Desktop/backup.sql Running: mysql --defaults-extra-file="/tmp/tmpKmnU4_/extraparams.cnf" --host=localhost --user=root --port=3306 --default-character-set=utf8 --comments --database=treehouse_movie_db < "/home/jessica/Desktop/backup.sql" 09:01:52 PM Import of /home/jessica/Desktop/backup.sql has finished
When I go to my server, I can see the treehouse_movies_db_clone schema; however, none of the tables are present. I tried doing a refresh. I also dropped the schema and reimported it. Nothing works.
I've tried to diagnose the problem myself but I've had no luck. Any suggestions for things I could look at to troubleshoot?
Best, Jessica
Jessica Rudder
2,778 PointsJessica Rudder
2,778 Points[EDIT: Removed bulk of file as the issue was in the first line - the USE command had not been updated to "treehouse_movie_db_clone'.]
Here's the SQL backup (in case that will help with identifying the issue):
CREATE DATABASE IF NOT EXISTS
treehouse_movie_db_clone
/*!40100 DEFAULT CHARACTER SET latin1 */; USEtreehouse_movie_db
;-- MySQL dump 10.13 Distrib 5.5.37, for debian-linux-gnu (x86_64)