Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot connect to phpMyAdmin on MAMP

Im getting this error message:

MySQL said:

Cannot connect: invalid settings. 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.

The user and pass are the default ones - both 'root'. I haven't set them anywhere. Ive tried various answers on here but nothing is working

like image 448
murph Avatar asked Jul 13 '16 13:07

murph


People also ask

How do I access phpMyAdmin with MAMP?

In MAMP, you need to open phpMyAdmin to create a MySQL database. If you have installed MAMP with the default ports, open the Welcome page in your browser (http://localhost:8888/MAMP/), then click the phpMyAdmin link at the top of the screen.

Why I Cannot connect to phpMyAdmin?

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.

Why MySQL server is not starting in MAMP?

The issue is usually due to another MySQL service running on the same port. The easiest solution is to kill all MySQL processes and restart MAMP. On macOS, you can do this using the Activity Monitor, which you'll find in the Utilities folder on your computer.


3 Answers

I was having the same problem, tried all these suggestions but nothing worked. So I did the only thing I could think off, restarted the machine...started MAMP, mysql server was off, so I just hit start server and it worked.

like image 113
Jay Smoke Avatar answered Oct 18 '22 00:10

Jay Smoke


In Preferences pane of MAMP switch back from PHP 7 to 5.6.10 and it should work again.

like image 43
rmaspero Avatar answered Oct 18 '22 00:10

rmaspero


/Library/Application Support/appsolute/MAMP PRO/phpMyAdmin/config.inc.php

Try changing the $cfg['Servers'][$i]['host'] from "localhost" to "127.0.0.1"

like image 43
Ham L. Avatar answered Oct 18 '22 00:10

Ham L.