I'm using version 5.1 of the MAMP app, but in your case there can be any other version of the MAMP app. If you use the non-standard version of the app, but the PRO one, then in the following steps, replace "MAMP" with "MAMP PRO", respectively.
In my case, it's my fault. Recently I bought a new computer and I decided not to transfer the settings from the old computer, but to set up a new computer from scratch. Thus, after changing the password of the MySQL root user, I forgot to set up the phpMyAdmin configuration file.
To solve this problem all we need to do is change the phpMyAdmin configuration file to use the actual password of the MySQL root user. To do this we have two methods. The first method is using Finder and the TextEdit app, and the second is using the Terminal app. Use the one that is convenient for you.
In this solution we will use the Finder and the TextEdit app. You do not need to download and install anything, because it is already built into every macOS.
If the MAMP app is running, click the Stop Servers button and quit the app.
In the Finder, go to the folder Applications -> MAMP -> bin -> phpMyAdmin.
Open the file config.inc.php in a text editor. As a text editor, I use the TextEdit app, but you can use any other editor. The contents of the file may seem complicated in understanding, but do not worry, we will not change a lot of things.
Use the search to find the line below. In my case, this line was 87th.
Replace 'root' with the actual password of the MySQL root user.
Save the changes and close the file config.inc.php.
Try to access the phpMyAdmin web page through the Safari browser.
The phpMyAdmin web page located at localhost/phpMyAdmin/index.php.
This is another method to do the same thing as in the previous solution (№1), but with use the Terminal app. You do not need to download and install anything, because it is already built into every macOS.
Enter the command below to open the file config.inc.php. As a text editor, I use the nano, but you can use any other editor.
The contents of the file may seem complicated in understanding, but do not worry, we will not change a lot of things.
That's it, you're done. Now the phpMyAdmin web page should be accessible without errors. If you are having trouble fixing this issue with the instructions above, but are being able to solve this problem with any another method please describe it in the comment section below. Thanks!