Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

WordPress Installing WordPress Locally Installing WordPress Locally Setting up the Environment

phpMyAdmin Access Denied

The following text is the error I get when trying to access phpMyAdmin. I have allowed everything in firewall settings.

Welcome to phpMyAdmin

Error

MySQL said: Documentation Cannot connect: invalid settings. mysqli_real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

I was able to overcome this error by changing the password of the mysql in mampp pro. You do not have to pay to change the password in mampp pro, and once I did I was to access phpMyAdmin without the error message appearing. I hope this helps:)

1 Answer

Hi Samuel and Mark: this thread seems to be identical to another thread

I'm having the same problem. Mark, I have MAMP but not MAMP Pro. Can I still change the MySQL Server password here? The instructor left steps on how to do this for the MySQL root user, which I was having trouble with in Windows. But does this look correct to you? I hope it does:

Change the password of the MySQL root user

Open the Command Prompt and enter the following command line:

C:/MAMP/Library/bin/mysqladmin -u root -p password [NewPassword] replace [NewPassword] with your new password.

Please bear in mind that you also have to change the phpMyAdmin configuration and probably your own php scripts to use the newly created MySQL password. For changing the phpMyAdmin configuration edit the file C:/MAMP/bin/phpMyAdmin/config.inc.php and up

Thank you very much. -Mark