Installing phpMyAdmin Advanced Features on Ubuntu

phpMyAdmin

To install the advanced features of phpMyAdmin you have to create a special control database that PMA uses to store bookmarks and relationships etc… PMA comes with a script called create_tables.sql that contains the relevant sql statements to set these tables up. Normally, when you install phpMyAdmin directly from source, this create_tables.sql script can be found in the scripts sub-folder.

Today I was feeling lazy so I decided to use apt-get to install PMA on my Ubuntu machine. However, when I went to enable advanced features, the scripts sub folder was pretty much empty (except for a setup.php script). It seems that with the debian package the advanced feature scripts have been moved to /usr/share/doc/phpmyadmin/examples – It took me ages to work this out, so hopefully this post might save someone some time!

Instructions
Firstly, unzip and run the create_tables.sql file:

cd /usr/share/doc/phpmyadmin/examples
sudo gunzip create_tables_mysql_4_1_2+.sql.gz 
mysql -u root -p < create_tables_mysql_4_1_2+.sql

Then setup a user/password for phpMyAdmin to use:

mysql -u root -p -e 'GRANT SELECT, INSERT, DELETE, UPDATE ON `phpmyadmin`.* TO 'pma'@'localhost' IDENTIFIED BY "password"'

Then edit the config file, and uncomment the advanced features options for your chosen server, and add the user / password you setup in the previous step. If you haven't edited this file before you may need to also uncomment the rest of the server definition.

sudo vim /etc/phpmyadmin/config.inc.php

21 thoughts on “Installing phpMyAdmin Advanced Features on Ubuntu”

  1. Thanks. I have already spent considerable time to solve this problem. Your guide did the magic in less than one minute.

  2. Thanks a ton, I kept running into a wall because I didn’t realize the entire server section of config.inc.php needed to be un-commented.

  3. Thanks, 4 years later and still going strong.

    I also had to mysql FLUSH PRIVILEGES; and log out and back in to phpMyAdmin before the notice at the bottom disappeared.

  4. I fixed it by running: sudo dpkg-reconfigure phpmyadmin

    Explanation:

    This launches the package-manager to reconfigure the phpmyadmin installation. Somehow this installation seemed to run smoother than the GUI-version of Ubuntu Software Center, at least in my case.

    It creates the database for you (as in create_tables.sql), creates a user in your mysql table and configures that user in /etc/dbconfig-common/phpmyadmin.conf, which in its turn is copied to /etc/phpmyadmin/config-db.php (holding the $dbuser, $dbpass and $dbname variables, which are used in /etc/phpmyadmin/config.inc.php and are commented out by default).

    For the package-manager to create that user in your mysql tables, it asks you for your mysql root user and password.

  5. Many thanks mate.

    You save me a lot of work.

    I don’t know why when using apt-get all web software is so awful to configure.

    Thanks!!!

  6. Almost 6 years after your original post and you just saved another guy a bunch of work! Thanks for posting this.

Leave a Reply

Your email address will not be published. Required fields are marked *