Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing phpmyadmin with home-brew

I have tried to install and configure phpmyadmin using home-brew. To install I used the commands brew install phpmyadmin and this is the summary of the message printed in the terminal.

==> Summary
🍺  /usr/local/Cellar/php71/7.1.0-beta.1: 342 files, 50.3M, built in 7 minutes 29 seconds
==> Installing homebrew/php/phpmyadmin
==> Downloading https://github.com/phpmyadmin/phpmyadmin/archive/RELEASE_4_6_2.t
==> Downloading from https://codeload.github.com/phpmyadmin/phpmyadmin/tar.gz/RE
######################################################################## 100.0%
==> Caveats
Note that this formula will NOT install mysql. It is not
required since you might want to get connected to a remote
database server.

Webserver configuration example (add this at the end of
your /etc/apache2/httpd.conf for instance) :
  Alias /phpmyadmin /usr/local/share/phpmyadmin
  <Directory /usr/local/share/phpmyadmin/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    <IfModule mod_authz_core.c>
      Require all granted
    </IfModule>
    <IfModule !mod_authz_core.c>
      Order allow,deny
      Allow from all
    </IfModule>
  </Directory>
Then, open http://localhost/phpmyadmin

More documentation : file:///usr/local/Cellar/phpmyadmin/4.6.2/share/phpmyadmin/doc/

Configuration has been copied to /usr/local/etc/phpmyadmin.config.inc.php
Don't forget to:
  - change your secret blowfish
  - uncomment the configuration lines (pma, pmapass ...)

==> Summary
🍺  /usr/local/Cellar/phpmyadmin/4.6.2: 2,256 files, 63.2M, built in 39 seconds

I followed the instruction at the terminal output, despite this when I type into the url http://localhost/phpmyadmin into safari I still end up with the error message, Safari can't open the page "localhost/phpmyadmin" because Safari can't connect to the server "localhost". I think it's possible that I have set the cookie configuration correctly in the phpmyadmin.config.in.php file but not sure how I can correct this.

like image 459
George Atkinson Avatar asked Jul 23 '16 15:07

George Atkinson


People also ask

How do I install phpMyAdmin?

Issue the command sudo apt-get install phpmyadmin php-mbstring php-gettext -y. Type in your sudo password when prompted and then allow the installation to complete.

Do you need Apache to run phpMyAdmin?

Introduction. phpMyAdmin is a very popular MySQL management software package. To use it, you'll need to install and configure Apache, PHP, and the PHP MySQL (or mysqli) extension.

How do I install phpMyAdmin?

Now you can install phpMyAdmin by running the following command: During the installation process, you will be prompted to choose a web server (either Apache or Lighttpd) to configure. phpMyAdmin can automatically make a number of configuration changes to ensure that it works correctly with either of these web servers upon installation.

Which softwares are required to install before phpMyAdmin?

With the Apache Server: In this process, the Apache server, the PHP, and the MySQL database are the softwares that are required to be installed beforehand, that is, before installing the actual phpMyAdmin tool to the same system.

How do I install homebrew on Linux?

Instructions for a supported install of Homebrew are on the homepage. This script installs Homebrew to its preferred prefix ( /usr/local for macOS Intel, /opt/homebrew for Apple Silicon and /home/linuxbrew/.linuxbrew for Linux) so that you don’t need sudo when you brew install.

Can I install phpMyAdmin on top of Nginx?

This guide will walk you through installing phpMyAdmin on top of an Nginx server. Note: phpMyAdmin runs on a database server, handles database credentials, and allows users to execute SQL statements on the database.


1 Answers

I found that the instructions are not complete, you also have to:

  1. Remove the '#' comment at the beginning in /etc/apache2/httpd.conf for LoadModule php5_module:

    LoadModule php5_module libexec/apache2/libphp5.so
    
  2. Edit the DirectoryIndex settings in /etc/apache2/httpd.conf to:

    DirectoryIndex index.php index.html home.pl index.cgi
    
  3. Save the file...

  4. Start Apache Webserver in Terminal application:

    sudo apachectl start
    

    If it's already started, it will show you a message: "service already loaded", in this case run:

    sudo apachectl restart
    
  5. Go to http://localhost/phpmyadmin

Wait for a bit then refresh the page several times (maybe a previous state was cached or the service is not started yet..)

like image 176
balazs630 Avatar answered Oct 17 '22 14:10

balazs630