Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access phpmyadmin brew

Simple question, but I'm having a hard time solving it

I've installed phpmyadmin via brew, with brew install phpmyadmin.

Now, my php, apache and mysql are working fine (It Works, and mysql cli), how do I access to phpmyadmin interface?

I tried http://127.0.0.1/phpmyadmin, but get a 404.

I can't find a way to get it work!

Here is the output of brew install phpmyadmin

installing dependencies for phpmyadmin: php55, mcrypt, php55-mcrypt
==> Installing phpmyadmin dependency: php55
==> Downloading http://www.php.net/get/php-5.5.6.tar.bz2/from/this/mirror
Already downloaded: /Library/Caches/Homebrew/php55-5.5.6
==> Patching
patching file configure
Hunk #1 succeeded at 39041 (offset 764 lines).
Warning: Backing up all known pear.conf and .pearrc files
Warning: If you have a pre-existing pear install outside
         of homebrew-php, or you are using a non-standard
         pear.conf location, installation may fail.
==> ./configure --prefix=/usr/local/Cellar/php55/5.5.6 --localstatedir=/usr/local/var --sysconfdir=/u
==> make
==> make install
==> /usr/local/Cellar/php55/5.5.6/bin/pear config-set php_ini /usr/local/etc/php/5.5/php.ini
==> Caveats
To enable PHP in Apache add the following to httpd.conf and restart Apache:
    LoadModule php5_module    /usr/local/opt/php55/libexec/apache2/libphp5.so

The php.ini file can be found in:
    /usr/local/etc/php/5.5/php.ini

✩✩✩✩ PEAR ✩✩✩✩

If PEAR complains about permissions, 'fix' the default PEAR permissions and config:
    chmod -R ug+w /usr/local/Cellar/php55/5.5.6/lib/php
    pear config-set php_ini /usr/local/etc/php/5.5/php.ini

✩✩✩✩ Extensions ✩✩✩✩

If you are having issues with custom extension compiling, ensure that
you are using the brew version, by placing /usr/local/bin before /usr/sbin in your PATH:

      PATH="/usr/local/bin:$PATH"

PHP55 Extensions will always be compiled against this PHP. Please install them
using --without-homebrew-php to enable compiling against system PHP.

✩✩✩✩ PHP CLI ✩✩✩✩

If you wish to swap the PHP you use on the command line, you should add the following to ~/.bashrc, 
~/.zshrc, ~/.profile or your shell's equivalent configuration file:

      export PATH="$(brew --prefix josegonzalez/php/php55)/bin:$PATH"
==> Summary
🍺  /usr/local/Cellar/php55/5.5.6: 491 files, 29M, built in 6.4 minutes
==> Installing phpmyadmin dependency: mcrypt
==> Downloading http://downloads.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.g
######################################################################## 100,0%
==> ./configure --prefix=/usr/local/Cellar/mcrypt/2.5.8 --mandir=/usr/local/Cellar/mcrypt/2.5.8/share
==> make install
🍺  /usr/local/Cellar/mcrypt/2.5.8: 12 files, 348K, built in 34 seconds
==> Installing phpmyadmin dependency: php55-mcrypt
==> Downloading http://www.php.net/get/php-5.5.6.tar.bz2/from/this/mirror
######################################################################## 100,0%
==> PHP_AUTOCONF="/usr/local/opt/autoconf/bin/autoconf" PHP_AUTOHEADER="/usr/local/opt/autoconf/bin/a
==> ./configure --prefix=/usr/local/Cellar/php55-mcrypt/5.5.6 --with-php-config=/usr/local/Cellar/php
==> make
==> Caveats
To finish installing mcrypt for PHP 5.5:
  * /usr/local/etc/php/5.5/conf.d/ext-mcrypt.ini was created,
    do not forget to remove it upon extension removal.
  * Restart your webserver.
  * Write a PHP page that calls "phpinfo();"
  * Load it in a browser and look for the info on the mcrypt module.
  * If you see it, you have been successful!
==> Summary
🍺  /usr/local/Cellar/php55-mcrypt/5.5.6: 3 files, 56K, built in 99 seconds
==> Installing phpmyadmin
==> Downloading http://downloads.sourceforge.net/project/phpmyadmin/phpMyAdmin/4.0.9/phpMyAdmin-4.0.9
######################################################################## 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
    Order allow,deny
    Allow from all
  </Directory>
Then, open http://localhost/phpmyadmin

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

Don't forget to copy config.sample.inc.php to config.inc.php and :
  - change your secret blowfish
  - uncomment the configuration lines (pma, pmapass ...)

==> Summary
🍺  /usr/local/Cellar/phpmyadmin/4.0.9: 1173 files, 28M, built in 40 seconds
like image 315
Marino Avatar asked Nov 30 '13 13:11

Marino


People also ask

How do I access phpMyAdmin on Mac?

You should be able to access phpMyAdmin directly, by browsing to http://127.0.0.1/phpmyadmin. Log in to phpMyAdmin by using the following credentials: Username: root. Password: The same as the application password.

How do I access my phpMyAdmin page?

Once phpMyAdmin is installed point your browser to http://localhost/phpmyadmin to start using it. You should be able to login using any users you've setup in MySQL. If no users have been setup, use admin with no password to login. Then select Apache 2 for the webserver you wish to configure.

How do I access phpMyAdmin on Linux?

Access phpMyAdmin on a BrowserIn case you use localhost, use the http://localhost/phpmyadmin URL. Due to security issues, Ubuntu 18.04 and Ubuntu 20.04 don't support root login. Instead, log in with the phpmyadmin username and the MySQL password you set during Step 1.


1 Answers

You need to add the following configuration to httpd.conf, as mentioned in the output of brew install.

Example path: /etc/apache2/httpd.conf

  Alias /phpmyadmin /usr/local/share/phpmyadmin
  <Directory /usr/local/share/phpmyadmin/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
  </Directory>

Then restart Apache.

Also, the configuration :

Don't forget to copy config.sample.inc.php to config.inc.php and :
  - change your secret blowfish
  - uncomment the configuration lines (pma, pmapass ...)
like image 159
Pranav 웃 Avatar answered Oct 13 '22 11:10

Pranav 웃