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!
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
Brandon Selfors
5,019 PointsmySQL Workbench Connection
Hello,
I read many forums about how to fix the connection issue between workbench and MAMP and have not found anything to help. I am running MAMP and both Apache and MySQL and running. When I open workbench and setup a new instance, I follow the instructions as given in the "database" tutorials yet still no connection.
Within the workbench connections, I have changed "connection name" to localhost. Same with Hostname field. I left the port to default 3306. I even changed both ports on workbench and MAMP to have the same port and different port using the MAMP suggestion in the "php" tutorial which is 8889. I left username to root and created a password. Basically I think i tried it all but need to some help solving this issue. Thanks - Brandon
10 Answers

Andrew Chalkley
Treehouse Guest TeacherHi this is how I got it working on my local machine:
1) Make sure that the MySQL instance is running
2) Take note of the connection details
3) Click New Connection
4) Fill in the Connection Details from the MAMP startupscreen (2)
5) Double click on the connection you just made
Enter your MAMP password and you should be connected to write queries.
After you've got that working you can optionally go over and create an instance and select the credentials from the drop down. You should use MAMP to manage if the server is running or not though :)
Hope that helps.

Sharon Walls
9,234 PointsI'm having MySQL Workbench problems too. I found this answer that sounds a lot like what you're encountering.

Brandon Selfors
5,019 PointsAwesome I got it working thanks Andrew Chalkley and Sharon!

Brandon Selfors
5,019 PointsI don't have a my.cnf file and I am using Mac. Any other suggestion?

Sharon Walls
9,234 PointsI'm not great with Macs but I think this file is created by MySQL Workbench the first time you use it. As to why it's not there, sorry, I don't know. :(

Brandon Selfors
5,019 PointsI still have not figured this out...

Sharon Walls
9,234 PointsMaybe Andrew Chalkley will know?

Brandon Selfors
5,019 PointsThanks! I will try this out and get back to you asap.

Elijah Collins
19,457 PointsI know that I may be a little to late but this link helped me out big time with linking workbench to MAMP
I followed the step by step and after applying the password as "root" which I will change at a later date, I it said I was connected and now I'm ready to get started.
Let me know if this helps

Jimmy Maurice
9,379 PointsThanks a lot ! It works. :)

Mario Ibanez
10,644 Pointsworks !