Install Homebrew
Paste that in a macOS Terminal or Linux shell prompt.
The script explains what it will do and then pauses before it does it. Read about other installation options.
What Does Homebrew Do?
Homebrew installs the stuff you need that Apple (or your Linux system) didn’t.
Homebrew installs packages to their own directory and then symlinks their files into
/usr/local
.Homebrew won’t install files outside its prefix and you can place a Homebrew installation wherever you like.
It’s all Git and Ruby underneath, so hack away with the knowledge that you can easily revert your modifications and merge upstream updates.
Homebrew complements macOS (or your Linux system). Install your RubyGems with
gem
and their dependencies withbrew
.“To install, drag this icon…” no more. Homebrew Cask installs macOS apps, fonts and plugins and other non-open source software.
Donate to Homebrew
Homebrew Blog
Analytics Data
Homebrew was created by Max Howell. Website by Rémi Prévost, Mike McQuaid and Danielle Lalonde.
How to Install phpMyAdmin on MacOS Introduction. PhpMyAdmin is a free and open source tool for the administration of MySQL and MariaDB. As a portable web application written in PHP, it has become one of the most popular administration tool for MySQL. In this tutorial, we will learn the steps involved in the installation of phpMyAdmin on MacOS.
Install homebrew:
- Brew updateでも当然updateが行われるのだが、パッケージををインストールするときにも毎回実行されるらしい。 $ brew install phpmyadmin Updating Homebrew. Auto-updated Homebrew! Updated 4 taps (homebrew/core, homebrew/php, homebrew/services, caskroom/cask). New Formulae #以下略.
- Brew install phpmyadmin Go to phpMyAdmin’s directory and link as a Valet site cd /usr/ local /share/phpmyadmin valet link pma In the snippet above, I linked the directory as pma, make sure Valet is started, then we can access the site at pma.vl (my Valet domain is set to vl).
- The phpMyAdmin project is a member of Software Freedom Conservancy. SFC is a not-for-profit organization that helps promote, improve, develop, and defend Free, Libre, and Open Source Software (FLOSS) projects.
/usr/bin/ruby -e '$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)'
Open Terminal and run the following Code: sudo apachectl start
Open your browser and access http://localhost. If it says It Works, then you are set otherwise see if your apachectl has started or not.
Let's make a backup of the default Apache configuration. This will help you to cross check later what you changed or in case you want to restore the configuration to default.
Now edit the httpd.conf with vi or any other text editor: vi httpd.conf
Now uncomment the following line (Remove #): LoadModule php5_module libexec/apache2/libphp5.so
Now Restart apache: sudo apachectl restart
To install MySQL: brew install mysql
Install brew services now: brew tap homebrew/services
Now start MySQL: brew services start mysql
Now configure MySQL : mysql_secure_installation

- Validate Password Plugin
- Remove anonymous users
- Disallow root login remotely
- Remove test database and access to it
- Reload privilege tables now - Choose yes
Brew Upgrade Phpmyadmin
After finishing this up, test MySQL: mysql -uroot -p
.
It will ask you write the password you set for mysql before. Enter password and then something like this appear:

Now we need to ensure PHP and MySQL:
All your sites would have URLs like http://locahost/some-site pointing to /Library/WebServer/Documents/some-site.
Note on Permissions
You may recieve 403 forbidden when you visit your local site. The Apache user(_www
) needs to have access to read, and sometimes write, your web directory.
Brew Phpmyadmin Login
You can either change permissions like this: chmod 755 directory/
or you can change the ownership of the directory to the apache user and group: chown -R _www:_www directory
This is optional. You can use MySQL through command line but this is a good way to administer MySQL. Download phpmyadmin from site.
Brew Mysql Phpmyadmin
Done! Done! Done!
