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 trialRishi Shah
5,298 PointsAccess Denied
I receive an access denied message when I try to create a remote connection for user1. What should I do?
1 Answer
Echo Yang
6,740 PointsYou should create user admin in your mysql. In terminal, you can type
<p>create user 'UserName'@'localhost' identified with mysql_native_password by 'yourPwd';</p>
Then you can create new connection in your workbench. This problem also confused me several hours. Hope I can help you.
Chad Burns
8,575 PointsChad Burns
8,575 PointsSo, I was also unable to connect with user1 via localhost or its equivalent 127.0.0.1, and was able to fix the problem two different ways:
To find you local IP address: On a Mac, go to System Preferences, click Network, and look for under "Ethernet" look for "IP Address" or under "Wi-Fi" and look for "Wi-Fi is connected to X and has the IP address of X.X.X.X". On a Windows PC, click the start button, click Run or click in the search box, type in cmd, hit Enter, type in "ipconfig", hit Enter, and look for IP Address or "IPv4 Address" for X.X.X.X (i.e. 10.1.42.2).
This has you modify Andrew's mysql statemant from the video changing user1@'%' to to user1@127.0.0.1. So, the whole mysql statemant looks like this:
GRANT SELECT ON treehouse_movie_db.* TO user1@127.0.0.1 IDENTIFIED BY 'password';
Even though I had already ran the GRANT SELECT statement, I ran the above statement again, and then ran the "FLUSH PRIVILEGES;" statement, and then I was able to connect using 127.0.0.1.