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 trialjitendra goyal
3,752 PointsAccess denied for user ''@'localhost' to database 'treehouse_movie_db'
GRANT SELECT ON treehouse_movie_db TO user1@'%' IDENTIFIED BY 'password' Access denied for user ''@'localhost' to database 'treehouse_movie_db' unable to execute any type of query.
2 Answers
Iain Simmons
Treehouse Moderator 32,305 PointsOh, sorry, you should have a dot and asterisk/star after the database name to indicate that the user should have access to all tables:
GRANT SELECT ON treehouse_movie_db.* TO user1@'%' IDENTIFIED BY 'password'
Iain Simmons
Treehouse Moderator 32,305 PointsMaybe try wrap the user name in single quotes too?
jitendra goyal
3,752 Pointsstill not working.i have same error.plz help me
jitendra goyal
3,752 Pointsjitendra goyal
3,752 PointsThanks very much..it solved the same way as you said.. your reply bit late , one of my friend rectify the issue
thanks mate