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!
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