How to configure phpMyAdmin from the MAMP installation to use an actual MySQL root password?
After changing the default password for the MySQL root user, we should not forget to edit the phpMyAdmin configuration file. But how do this if we use the MAMP app from appsolute GmbH for local web development on our macOS device. In this tutorial, I’ll show you how to configure phpMyAdmin from the MAMP installation to use an actual password of the MySQL root user.
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.
Let’s begin
All we need to do is edit the phpMyAdmin configuration file from the MAMP installation. This is a really easy process. 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. Now, step by step guide.
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.
Replace ‘root’ with an actual password of the MySQL root user.
Save the changes and close the file config.inc.php .
Launch MAMP and click the Start Servers button.
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.
If the MAMP app is running, click the Stop Servers button and quit the app.
Launch the Terminal app from the Utilities folder of your Applications folder, or use Spotlight to find it.
The contents of the file may seem complicated in understanding, but do not worry, we will not change a lot of things.
Replace ‘root’ with an actual password of the MySQL root user.
Save the changes and close the file config.inc.php .
Launch MAMP and click the Start Servers button.
The phpMyAdmin web page located at localhost/phpMyAdmin/index.php .
Conclusion
That’s it, you’re done. Now you have configured phpMyAdmin to use an actual password of the MySQL root user. So simple isn’t it?
I hope this article has helped you learn how to configure phpMyAdmin from the MAMP installation to use an actual password of the MySQL root user. If this article has helped you then please leave a comment
Thanks for reading!
If this post helped you out and you’d like to show your support, please consider fueling future posts by buying me a coffee cup!
MAMP (macOS) Documentation
The default MAMP WebStart page provides links to access utilities such as phpMyAdmin, phpInfo, SQLite Manager, phpLiteAdmin and the MAMP website.
Tools
phpInfo
phpInfo shows you information about PHP configuration.
phpMyAdmin
phpMyAdmin is a web-based database administration tool written in PHP. Your MAMP instance of phpMyAdmin can be accessed through a link in the WebStart page Additional MySQL users can be created using the User Accounts tab.
phpLiteAdmin
phpLiteAdmin is a web-based SQLite database administration tool written in PHP with support for SQLite3 and SQLite2.
APC
The Alternative PHP Cache (APC) is a free and open opcode cache for PHP. You can learn more about APC here.
eAccelerator
eAccelerator a free open-source PHP accelerator & optimizer. You can learn more about eAccelerator here.
XCache
XCache is a open-source opcode cacher. You can learn more about XCache here.
OPCache
OPcache improves PHP performance by storing precompiled script bytecode in shared memory, thereby removing the need for PHP to load and parse scripts on each request. You can learn more about OPcache here.
Tools
Documentation
A click on this menu item opens the documentation for MAMP.
Screencasts
A click on this menu item opens our channel on YouTube. There you will find numerous screencasts about MAMP.
Bugbase
A click on this menu entry takes you to the bugbase. If you have found a bug in the software, you can enter it there and we will fix it as soon as possible. Of course you can also enter suggestions for improvement or wishes there.
Examples
Several examples show how to connect to the databases (MySQL, SQLite) using PHP, Python, Perl and Ruby. Examples for the connection to SQLite are available in PHP.
getting to phpmyadmin with mamp
I’m using MAMP, and trying to get to phpmyadmin. loaclhost/phpmyadmin isn’t working.. the sql light is green so it is enabled.
I have changed the Document Root to /Users/troycosentino/Sites/easyuniv/ and when i open the start page from MAMP it is a page created by apple it looks like, not MAMP.
9 Answers 9
If i go to localhost:8888/MAMP it gives me the MAMP screen, from which i can go to phpmadmin.
If MAMP has MySQL Server and Apache Server running.
You can go to phpMyAdmin via url http://localhost/phpMyAdmin/
Try this localhost:8888/MAMP/?language=English
Click on phpMyAdmin tab and you have it.
On Windows pay attention to capital letters:
You can directly access it at the link below, make sure that it contains the same uppercase letters.
Or if you prefer
On macOS MAMP, you need to go to
and from nav-menu choose: tools>PhpMyAdmin
My htdocs folder was only filled with personal projects.
I have no idea WHY this works, but it did for me:
In the httpd.conf folder (do a command + space and search for that if you don’t know what it is already), change your root folder to:
Comment out your OLD document root with a ‘#’, such that it will look like:
Then, repeat those changes for the Directory path:
Stop/Restart MAMP. For good measure, try loading local server in your browser, it shouldn’t work.
Then, undo everything above and change your document and directory roots back to their originals.
Stop/Restart MAMP. Try navigating to localhost/phpmyadmin or localhost:8888/phpmyadmin again.
Not sure exactly why, but it seems to trigger MAMP to behave itself. Hope that helps
How to setup phpMyAdmin on a Mac with OSX 10.8 + (MAMP Part 3)
Welcome to part 3 of the MAMP tutorial. In this post we will go over setting up phpMyAdmin on your Mac’s localhost. Part 2 walks you through installing mysql on your localhost read. Part 1 shows you how to setup up Apache on your Mac.
What green means: any lines that you need to replace in this tutorial will be in green.
Step 1
Fix socket error:
Step 2
Download phpMyAdmin:
Go to phpMyAdmin download page and choose the file in your language. I usually download phpMyAdmin-3.5.6-english.tar.gz
Unzip the file, rename it to phpMyAdmin, and move it into your Sites folder. You may need to create a Sites folder in your users directory.
/Users/ username /Sites/phpMyAdmin
Step 3
Setup phpMyAdmin config:
1. Make the config folder
2. Change the permissions
Go to the new phpMyAdmin localhost URL in your browser and run the phpMyAdmin setup
Step 4
Setup phpMyAdmin settings:
1. Open your browser and go to the url
3. The new page will load and click on the “Authentication” Tab
4. Enter the Mysql root user and password (this was set in the previous mysql setup tutorial)
5. Click “Save” – This will take you back to the previous screen.
6. Scroll to the bottom of the page and click “Save” to finish
7. A new file called config.inc.php is now created in the /config directory that we created previously. Move this file from phpMyAdmin/config/ to phpMyAdmin/
8. Delete the /config folder
Step 5
Go to your newly created phpMyAdmin:
1. Make sure your Mysql is running
2. Open your browser and go to the your phpMyAdmin url
3. Login using your mysql username and password
Congratulations! You have now installed phpMyAdmin to run on your Mac’s localhost. Pat on the back.
Share this:
Related
- Tags
By Jonathan Whiting
I enjoy sharing what I am learning and hopefully it’s of interest and help to you. I live in Canada with my wife. Follow me on Twitter.
52 replies on “How to setup phpMyAdmin on a Mac with OSX 10.8 + (MAMP Part 3)”
Hey, this is indeed the simplest, clearest guide to setting up MAMP I have found. Much appreciation for your work.
I worked through Parts 1, 2 and 3 without problems, until I get to Part 3,
Step 5 and cannot log into http://localhost/
richard/phpMyAdmin/
-Though I see “Welcome to phpMyAdmin” page and enter my username/password, I only receive ‘waiting for localhost…’ browser message; the login screen doesn’t change; no error message.
-Cookies are enabled.
-I’ve checked my /Sites/phpMyAdmin/config.inc.php file for username (‘root’ without quote marks) and password; I’m using them in the login screen (though I did try ‘richard’ as username, got same response).
-I’ve restarted Apache & and stopped/started Mysql (in that order).
-I’ve changed the config.inc.php as suggested:
$cfg[‘Servers’][$i][‘host’] = ‘localhost’;
to
$cfg[‘Servers’][$i][‘host’] = ‘127.0.0.1’;
-I checked Apache for errors with sudo apachectl -t and received the following:
“httpd: Could not reliably determine the server’s fully qualified domain name, using Richard-Prices-Computer-4.local for ServerName
Syntax OK.” I don’t know if this means anything is wrong or not.
-I’ve tried everything except resetting the mysql password (your first reply to a question). i’m afraid I’m command line ignorant; I couldn’t get those commands to work in Terminal.
-I’m at wits end. Any help?
Thanks,
Richard
Argh. Okay. Figured it out. Disregard my post of yesterday.
I had left my “User for config auth” in the Authentication tab of the “Add a new server” screen set to ‘root’ (failed to change it to my username). Now all is well to this point!
Amazing what a few hours break will do, that plus a 2nd walk thru the steps.
Richard
Sorry for the late response. It is amazing what a couple hours away will do. I’m constantly surprised by that myself. Thanks for taking the time to comment. Have a great day.
Thanks very much for the great tutorial.
I have a problem
Not able to login to phpMyAdmin
I have already changed
$cfg[‘Servers’][$i][‘host’] = ‘localhost’;
to
$cfg[‘Servers’][$i][‘host’] = ‘127.0.0.1’;
as per your previous posts. But still it doesn’t work
Can you help me to solve this. I have an interview coming up within 3 days, so I trying to setup and learn php and mysql. Please help me. This is going to be a life saver for me
Thanks Jonathan
Will send you a private email tonight, hopefully will be able to help you resolve this.