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 Using PHP with MySQL Connecting PHP to MySQL Creating the Products Table

Gareth Powell
PLUS
Gareth Powell
Courses Plus Student 7,016 Points

How to connect to mySQL server when it says "Access Denied"?

Hi Everyone,

I am trying to connect to the MySQL server via MAMP. I am using Windows 8. I also changed my password from the default to one I know. I thought I had done this correctly via phpMyAdmin. However, I now try to access it via MAMP and when following along in the course, yet it keeps saying "Access Denied".

Does anyone know how to sort this?

Thanks

Hugo Paz
Hugo Paz
15,622 Points

Hi Gareth,

Can you please tell us where you change the password? Did you change the password as well in the database.php file?

2 Answers

Chris Shaw
Chris Shaw
26,676 Points

Hi Gareth,

Resetting the MySQL password for MAMP requires another update which you can find information about at the below link, essentially you need to update the defined in phpMyAdmin's config file before it will allow access to the MySQL database again.

http://www.mamp.info/en/documentation/#q9

Gareth Powell
PLUS
Gareth Powell
Courses Plus Student 7,016 Points

Thanks Hugo Paz & Chris Upjohn . I think I have sorted it. Thanks again.

(Chris' suggestion was on track)