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 trialtaylor rosen
1,258 Pointswhen I type in "SELECT * FROM movies;" it gives me "error: error formatting sql query: empty string given as argument...
...for ! character..." I typed the same thing as the instructor and clicked the lightning. I tried actors and got the same error
7 Answers
taylor rosen
1,258 Pointsnevermind, I was supposed to set the movie_db to default
Greg Robinson
10,798 PointsYes it does thank you ... found that out about 30 seconds ago lol,,,I'll just keep plodding on now ...thank you again for the response
Athoug Alsoughayer
7,949 PointsThank you for this answer. It really helped figure out the problem :)
Greg Robinson
10,798 PointsAndrew Chalkley explains how to set a database as the default in the video following this one ...
richardhemmings
1,613 PointsI have exactly the same problem but now it works a treat.... only took me an hour how to set the mysql workbench up! I realised I had to set the credentials up in MAMP lol
Not done much with SQL before so this should really help me out.... hopefully
Happy SQL'ing lol
Michael O'Kane
5,896 Pointsfor anyone having a problem with this on my workbench (lastest?) it seems to only accept the full path
SELECT * FROM treehouse_movie_db.movies;
Jason Anders
Treehouse Moderator 145,860 PointsDo you have treehouse_movie_db set as your default database?
Michael O'Kane
5,896 PointsThink I got a bit ahead of myself. if you default the database you dont need to use the extended syntax. My problem was that I hadn't got to that part of the video yet.
Jason Anders
Treehouse Moderator 145,860 PointsJason Anders
Treehouse Moderator 145,860 PointsMOD edit: changed to Answer and marked as Best Answer as this has solved other students' issues with this part (including my own.).
Jason Anders
Treehouse Moderator 145,860 PointsJason Anders
Treehouse Moderator 145,860 PointsHi Greg,
Whichever database is bold, that is the one that is 'set to default.
If you need to set one to default, you can: 1. double-click on it in the list. OR 2. right-click and choose 'set as default.' OR in the work-area, execute the command
USE movie_db;
Hope this helps you.