← Other topics

Run phpMyAdmin on a Mac (Herd / DBngin)

Video Notes

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.

In my example, I’m running Nginx via Herd and MySQL via DBngin, but the following instructions should be adaptable for other setups as well.

phpMyAdmin running on a Mac


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 http://phpmyadmin.test.

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.

Within config.inc.php I updated $cfg['Servers'][$i]['AllowNoPassword'] to 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)
Login without a password is forbidden by configuration (see AllowNoPassword)

Next, I had to update $cfg['Servers'][$i]['host'] from "localhost" to "". 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:

  • Username: root
  • Password: blank

If this info helped you out you can say thanks and support future content by clicking my Amazon affiliate link: https://amzn.to/3UtgnYk. If you make a purchase on Amazon within 24 hours of clicking the link I may receive a micro-commission and it costs you nothing extra. Any income from these sales goes directly to supporting me in making new videos and guides. Thank you for your support!

← Other topics