1. How to install and configure Apache, MySQL, PHP & phpMyAdmin on OSX 10.8 Mountain Lion for a local web development environment.http://coolestguidesontheplane.
  2. STEP - 1: Set a New Port in XAMPP-VM. First step you should to do is creating a new port in XAMPP-VM, and notes your macbook IP address (e.g. 192.168.x.xx), then make sure your macbook and the other device have a same network connectivity. After that, you can create a new port with click the 'add' button and change 'remotePort' to 81 (81 just.
  1. Phpmyadmin Osx Tutorial

PhpMyAdmin 4.9.7. Released 2020-10-15, see release notes for details. Older version compatible with PHP 5.5 to 7.4 and MySQL/MariaDB 5.5 and newer. Currently supported for security fixes only. This is the only SQL client which is supported and developed by MySQL, so you can be sure that it always contains all the functions to match the most recent updates for MySQL. It is also a cross-platform software that can be used on Windows, Linux, and Mac OS. So the experience is consistent from one OS to another.

First of all, get the latest Xcode version (6.1) via the Mac App Store: Mac App Store link

As soon as the download is finished, open Xcode.app in your /Applications folder and agree to the licence.

Open a new Terminal.app window and install the Xcode command line tools:

Confirm the installation dialog with Install.

Back in Xcode, hit + , to access the Preferences and then navigate to the Locations tab to set the Command Line Tools to the latest version available — Xcode 6.1 (61A1052c) in my example:

Make sure you have at least Xcode 6.1!


Now you need to install Homebrew, a package manager for OS X — kind of like apt is one for Linux. brew works the same, just for Mac operating systems. It will make sure that you receive the latest updates of your installed packages, so you don't need to worry about outdated versions or vulnerable security flaws, etc.

First, you need to download and install Homebrew using the following command:

Check for any conflicts or problems (If you have conflicts, sort them out before you continue with this guide):

Make sure the doctor responds with something along the lines:

Your system is ready to brew.

In case you already had Homebrew installed, update the existing Homebrew installation as well as the installed packages:

Because Homebrew doesn't come with a formula for PHP-FPM by default, you need to tap (or register) a special PHP repository first:

Now you can install PHP using the following command. The arguments make sure it compiles with MySQL support and doesn't configure the default Apache:

Homebrew is now going to download and compile the PHP-FPM source code for you. Give it some time, it could take some minutes. ☕

Setup PHP CLI binary

If you want to use the PHP command line tools, you need to update the $PATH environment variable of your shell profile.

If you use the default Bash shell:

If you use ZSH:

If you are not sure which one you use, run echo $SHELL in a Terminal.app window. Since I use ZSH it returns this:

Setup auto start

Create a folder for the LaunchAgents and symlink the start/stop service:

Now try to start PHP-FPM:

Assure PHP-FPM is running. To do so, check if there is an open listener on port 9000:

The output should look something like this:

Next step is to install our MySQL server:

And set up the start/stop service, so the MySQL server gets automatically started and stopped when the Mac is shutdown/powered on:

To start if manually for now, run:

Secure the installation

To secure our MySQL server, we'll execute the provided secure_mysql_installation binary to change the root password, remove anonymous users and disable remote root logins:

Press Enter since you don't have one set.

Phpmyadmin Osx

Confirm using Enter to accept the suggested default answer (Y), choose a root password, add it to your 1Password keychain or just write it down and finally enter it here in the prompt.

Yes - Enter. They are not necessary.

Enter — No need to log in as root from any other IP than

Enter — You don't need the testing tables.

Enter — Reload the privilege tables to ensure all of the changes made so far will take effect immediately.

Test connection

Enter your root password and you should see the MySQL console:

Since you now know that this works, you can log out and quit the session using q:

Install autoconf, which is needed for the installation of phpMyAdmin:

And set the $PHP_AUTOCONF environment variable:

If you use the default Bash shell:

or if you use ZSH:

Since now you're all set, you can finish this part with the actual installation of phpMyAdmin:

Install the default Nginx with:

Setup auto start

Since you want to use port 80 (default HTTP port), you have to run the Nginx process with root privileges:

(Only the root user is allowed to open listening ports < 1024)

Test web server

Start Nginx for the first with:

The default configuration currently active so it will listen on port 8080 instead of the HTTP default port 80. Ignore that for now:

The output should look like this:

Stop Nginx again:


Create these bunch of folders which we're going to use for the upcoming configuration:

Remove the current nginx.conf (which is also available as /usr/local/etc/nginx/nginx.conf.default in case you want to restore the defaults) and download my custom from GitHub:

The configuration is simple and as lightweight as possible: worker settings, log format/paths and some includes. None of unnecessary (and probably commented out) stuff like in the nginx.conf.default.


Download my custom PHP-FPM configuration from GitHub:


Setup example virtual hosts

Clone my example virtual hosts (including 404/403 error pages and a phpinfo() status site) using git:

And remove the .git folder so your content won't get tracked by git.

Setup SSL

Create a folder for our SSL certificates and private keys:

Generate 4096 bit RSA keys and the self-sign the certificates in one command:

Enable virtual hosts

Now you need to symlink the virtual hosts that you want to enable into the sites-enabled folder:

And start Nginx again:

Phpmyadmin export sql

Congratulations, that's it! Everything should be set up and running. Click on the links below to ensure that your virtual hosts show the correct content:

Virtual hostExpected content
http://localhost'Nginx works' page
http://localhost/infophpinfo() status
http://localhost/nope'Not Found' page
https://localhost:443'Nginx works' page (SSL)
https://localhost:443/infophpinfo() (SSL)
https://localhost:443/nope'Not Found' page (SSL)
https://localhost:306phpMyAdmin (SSL)

Because your probably need to restart the one or other service sooner or later, you probably want to set up some aliases:

If you use the default Bash shell:

or if you use ZSH:

Now you can use handy short aliases instead of typing the long launchctl commands:


You can start, stop and restart Nginx with:

To quickly tail the latest error or access logs:

Check config:


Start, start and restart PHP-FPM:

Check config:


Start, start and restart your MySQL server:

Here are some of the frequently asked questions from the comments. In case you encounter any issues or problems, check below to find a solution.

Nginx: '[emerg] mkdir() '/usr/local/var/run/nginx/client_body_temp'

Upgraded to Yosemite and now Nginx doesn't start anymore? Try to reinstall the brew formula:

PHP-FPM: 'lsof -Pni4 grep LISTEN grep php' doesn't return anything

Make sure your $PATH variable is properly set:

If that command doesn't return anything at all, you probably forgot to adjust your .zshrc/.bash_profile. Make sure to add this line at the end:

git: 'Could not resolve host: git.frd.mn'

Probably an outage of my private hosted GitLab server. To fix this, simply try to get in touch with me. Either via Twitter, E-Mail IRC ([email protected]/espernet) or the comment section below.

curl: 'Failed to connect to localhost port 80: Connection refused'

This is an IPv6 related issue, originating in the /etc/hosts file of your Mac. To fix this, find the line 'fe80::1%lo0 localhost' and comment it out. Or just use this one-liner:

brew: 'configure: error: Can not find OpenSSL's '

Make sure Xcode as well as Xcode's CLI tools as installed and up to date!

Mavericks: Compilation error while building PHP / missing zlib

Try to restore the /usr/include directory:

Phpmyadmin Osx Tutorial

Let me know in case you're stuck at some point or have general feedback or suggestions!