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 trialAbdirahman Shire
12,987 PointsMySQL workbench won't connect to server.
It is giving me this Access denied for user 'root'@'localhost' (using password) Any help. please...
5 Answers
Harriet Ryder
16,885 PointsI was having the same problem connecting to MySQL with Workbench - Workbench kept asking for a password and would not accept the temporary password I was given during installation.
After trying all sorts of things I began to wonder whether it might be because I have MAMP installed already. I opened the MAMP start page and decided to try opening a Workbench connection using the MySQL details displayed there, including port number 8889. This worked for me, I'm not sure why, but if you already have MAMP installed perhaps this will work for you too?
Nathan Tallack
22,160 PointsWhen you install it will set a random root password. It will tell you what that root password is in the last window of the installer. If you are using a Mac it will even put it in your notification centre.
Log in using this password the first time and change you root mysql passsword to something secure that you will not forget. :)
Abdirahman Shire
12,987 PointsA temporary password is generated for root@localhost but after couple of minutes it expired. Is there anyway I can reset it? Thanks
Nathan Tallack
22,160 PointsI was not aware it could expire. That is something new. No idea how they would even make that work.
You could try uninstalling mysql and reinstalling it. Be sure to reboot your workstation between uninstalling and reinstalling. :)
Asma Al-Marrikhi
45,525 PointsThank you very much .. :)
Zachary Kent
7,133 PointsIf you're on the newer version of mySQL workbench and can't connect to your mySQL server during the set up you need to go into system preferences and turn the server on manually. It should be on the bottom row of the system preferences(on mac), the teacher briefly mentioned this feature in the video but never showed actually turning it on. After the mySQL server is turned on the mySQL workbench will be able to connect to it and it will ask for the temporary password you received during setup. You also need to have hostname set to localhost on the "manage server connections" form in mySQL workbench. Hope this helps anyone who encounters this problem in the future.
Romuald Le Bris
3,975 PointsHi there !
I installed the mysql workbench but I can't manage to make a database work. It keep sending me error messages. I have MAMP installed on my computer already ? Is it the problem ?
gittyherz
11,818 Points@harrietryder thanks! I was unable to connect to MySQL and had MAMP installed previously and followed your advice and it worked!