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 trial

Development Tools

Maximilian Lemos
Maximilian Lemos
1,654 Points

MySQL: Your connection attempt failed for user 'root' from your host to server at 127.0.0.1:3306

When attempting to setup my first server instance I am getting an error:

Your connection attempt failed for user 'root' from your host to server at 127.0.0.1:3306: Access denied for user 'root'@'localhost' (using password: NO)

Please: 1 Check that mysql is running on server 127.0.0.1 2 Check that mysql is running on port 3306 (note: 3306 is the default, but this can be changed) 3 Check the root has rights to connect to 127.0.0.1 from your address (mysql rights define what clients can connect to the server and from which machines) 4 Make sure you are both providing a password if needed and using the correct password for 127.0.0.1 connecting from the host address you're connecting from

I am not sure how to proceed or troubleshoot. Thanks for the help!

Ashley Wile
Ashley Wile
8,452 Points

Hello! I had a hard time setting this up as well...I guess it can be quite tricky to get this connection to work, as I have been told...but I have managed! What operating system are you using? I had to try a few different versions of Xampp, that is what I am using, before my connection would work. Are you using phpMyAdmin for set-up?