In this guide I’ll show how to run phpMyAdmin on a Mac. This guide assumes you already have a Apache or Nginx web server running locally, as well as a MySQL database server.
Download phpMyAdmin from phpmyadmin.net.
Unzip the download, rename the folder
phpmyadmin and move it to your local server’s document root. Then configure your local server so you can load this folder as a site in your browser.
For example, my local server is powered by Herd so I will move the
phpmyadmin folder into my
~/Herd directory. Herd will then automatically detect this folder and configure a URL for it, so I will be able to access in the browser via
If you’re not using a platform like Herd, you may have to take additional steps to configure a URL for phpmyadmin by editing things like your server’s virtual host configs and your computer’s hosts file.
There are a couple config changes I had to make to get phpmyadmin to work with my setup.
To make these changes, I created a duplicate of the
config.sample.inc.php file in my phpmyadmin directory and named it
config.inc.php I updated
true. This was necessary because my MySQL server (run via DBngin) sets up MySQL with a blank password by default. Without this config, I received this error:
Login without a password is forbidden by configuration (see AllowNoPassword)
Next, I had to update
"127.0.0.1". Without this config I received this error:
Cannot log in to the MySQL server mysqli::real_connect(): (HY000/2002): No such file or directory
With the above configs in place, I was able to log into phpMyAdmin using my MySQL server’s default credentials:
- Password: blank