I Changed root password for phpMyAdmin, now I can't access MAMP

I Changed root password for phpMyAdmin, now I can't access MAMP

This is main problem with MAMP user that when they new in MAMP they changed root password.
When they go to phpMyAdmin then they can not access the MAMP

Now there is a small and fast way to change the password from console of MAC
Open you Console first

Then run this command

/Applications/MAMP/Library/bin/mysql -uroot -p

It will ask for your changed password(current password)
Enter password:

Enter the password or if you set it as blank then just enter without typing any key.

It will show something like this on your console which means you are connected now to MYSQL server via command line

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 5.5.38 Source distribution
mysql> 

Now you need to use mysql table where is username and password are saved
run this command
use mysql;

Now run update query to change the password 
update user set password=PASSWORD('root') where User='root'; 

Success message
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

Now run this command to set you privileges as it was defalut
flush privileges;

mysql> quit
Bye

Done now restart your MAMP and you can access the MAMP phpMyAdmin

Comments