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 Introduction to Local Development

Alexandra Cianciara
Alexandra Cianciara
2,465 Points

Mamp won't start the servers

I installed the mamp, created the website in wordpresss, shut down my pc and now mamp wont start.

There is some issue with SQL, it says on the mamp admin this: 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.

Please help. Thank you

3 Answers

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 90,689 Points

I don't use MAMP, myself but on my XAMPP local server, there's a setting to switch on SQL services as well as Apache. That's what opens access to phpMyAdmin. Maybe you need to switch on a setting like that for it to work.

Alexandra Cianciara
Alexandra Cianciara
2,465 Points

Thank you Jonathan Grieve . Where do you do this?

I read several sources and followed this route: C:\MAMP\bin\phpMyAdmin and opened config.inc in Brackets and in the following code I had:

$cfg['Servers'][$i]['AllowNoPassword'] = false;

and changed it to:

$cfg['Servers'][$i]['AllowNoPassword'] = true;

But it's not working at all.

/* Authentication type / $cfg['Servers'][$i]['auth_type'] = 'config'; / Server parameters / $cfg['Servers'][$i]['host'] = 'localhost'; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['compress'] = false; / Select mysql if your server does not have mysqli */ $cfg['Servers'][$i]['extension'] = 'mysqli'; $cfg['Servers'][$i]['AllowNoPassword'] = true; $cfg['Servers'][$i]['port'] = '3306'; // MySQL port $cfg['Servers'][$i]['user'] = 'root'; // MySQL user $cfg['Servers'][$i]['password'] = 'root'; // MySQL password

Alexandra Cianciara
Alexandra Cianciara
2,465 Points

The issue is where I go from MAMP application and go to WebStart page: http://localhost/MAMP/?language=English

The page is being blocked and it says to check connection and proxy and firewall settings. The site cannot be reached.

Because of this I cannot even go to Mamp Admin settings.

Please could someone help me.