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

PHP

MAMP/mySQL - Access Denied

I am trying to set up a PHP page to connect to a database, but I cannot connect to my database because of the root password. I never set a password up, but one exists. I have followed every tutorial I can find to reset it, but through terminal, all the commands are not found. I used the phpMyAdmin interface to turn the password off for the root user, and it completely broke and would no longer connect. I uninstalled and reinstalled, then I changed the password instead of removing, but got the same issue. I cannot change the password through terminal, or phpMyAdmin, and I cannot seem to get it to work. Does anyone have any suggestions? What would the root password be set to by default? Why would ever command I find online not be found on my computer?

That was it. You are a life saver. I have no idea why no one seemed to mention anywhere I looked. Thank you very much.

1 Answer

If I remember correctly, the default is username: root, password: root for a new installation of MAMP. If that doesn't work I suggest you just delete MAMP (assuming you have sql copies of any databases), download a new copy and start over.