Web interface to MySQL: phpMyAdmin


by ross at 17:54:06 on March 20, 2014


# cd /usr/ports/databases/phpmyadmin
# make install clean
# rehash

Options for phpMyAdmin:

  • Check MYSQLI


    Alias /phpmyadmin "/usr/local/www/phpMyAdmin/"

    <Directory "/usr/local/www/phpMyAdmin/">
        Options None
        AllowOverride None
        Order Deny,Allow
        Deny from all
        Allow from .lan

Replace .lan with your local network. You should really limit acces to you LAN because any server on the web will be scanned for /phpmyadmin directory. Another solution is to name it like /you-wont-guess-it instead of /phpmyadmin.

Restart apache:

# service apache22 restart

Make config file readable to web server:

# cd /usr/local/www/phpMyAdmin
# chown www config.inc.php

Prepare phpMyAdmin config folder:

# cd /usr/local/www/phpMyAdmin
# mkdir config
# cp config.inc.php config/
# chown -R www config

Navigate to http://yourserver/phpmyadmin/setup and create a server (localhost)

  • Set connection type: socket
  • Set socket to: /tmp/mysql.sock
  • PHP extension to use: mysqli
  • Authentication type: cookie

Click "Save".

Finish configuration:

# cd /usr/local/www/phpMyAdmin
# cp config/config.inc.php config.inc.php
# rm -rf config

Navigate to http://yourserver/phpmyadmin/ and login as root.

I recommended a new mysql web interface written by PHP. Dashboard for MySQL, please take a look: dashboard.dbface.com
-- Recommend a MySQL web interface
Sunday, August 31, 2014, 6:33:13
I think the whole reason for using FOSS is that it's Free and Open Source. Hence no need for a license for every single domain. The software you mention looks interesting but at 40 per domain name it's not going to be a lot of people's cup of tea. And I am also making a guess that support will be hard to find outside of paying them when you have an issue.
-- NightShade
Wednesday, September 23, 2015, 7:41:36
Why do you think I'm still getting no permission to access /phpmyadmin/setup when I try to navigate the site even after changing ownership with the files you have mentioned on this instructions? thanks.
-- mcac
Sunday, May 17, 2015, 1:14:49