Brew Phpmyadmin

Posted on  by 



Install homebrew:

Brew tap homebrew/dupes brew tap homebrew/homebrew-php brew install phpmyadmin This information was from the homepage for Homebrew-PHP, 'a centralized repository for PHP-related brews'. PhpMyAdmin is a free software tool written in PHP, intended to handle the administration of MySQL over the Web. PhpMyAdmin supports a wide range of operations on MySQL and MariaDB. Frequently used operations (managing databases, tables, columns, relations, indexes, users, permissions, etc) can be performed via the user interface, while you.

/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

Phpmyadmin

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

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.

Brew Phpmyadmin Config

Note on Permissions

Brew Phpmyadmin Minecraft

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.

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 Install Phpmyadmin

Done! Done! Done!





Coments are closed