Christopher Juckins

SysAdmin Tips, Tricks and other Software Tools

User Tools

Site Tools


Installing phpMyAdmin Tips

  • Ensure php-mcrypt, libmcrypt, php-mbstring, php-pear-MDB2-Driver-mysqli.noarch are installed and httpd service restarted
  • Ensure mysql/mariadb installation has been secured
  • Download, unpack, install from
  • Create symbolic link to phpmy
  • cd to phpmy and set up
  • Login to web interface as user root

Enable special tables

  • Run SQL as shown in the section "MySQL version 4.0.2 or newer" on configure Control User
    • Instructions above are now missing
    • Login to the older server's phpmyadmin as root and go to User accounts. Find the control user and export it. Take that code and paste it into the SQL box on the server's phpmyadmin page.
    • Repeat step above for user pma.
  • Create control user/password as defined in and set access for "localhost"
  • As root, grant privileges to control user:
  • GRANT SELECT, INSERT, UPDATE, DELETE ON <pma_db>.* TO 'pma'@'localhost' IDENTIFIED BY 'pmapass';
  • pma_db defined in
  • Follow instructions and run script in <PHPMYADMIN_ROOT>/sql/create_tables.sql
    • Can be done at the command line
      • cd to <PHPMYADMIN_ROOT>/examples/
      • As root: mysql -uroot -p <./create_tables.sql
  • Logout, log back into phpMyAdmin to see new database and tables

Installing phpMyAdmin updates and merging configuration files
1. diff /current/phpmyadmin/ /new/phpmyadmin/

2. Take note of new or changed entries in the latest configuration file; some may be commented out.

Example of diff:

diff /var/www/html/phpMyAdmin-X.1-english/
<  * @package phpMyAdmin
>  * @package PhpMyAdmin
< $cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
> $cfg['blowfish_secret'] = 'ABCDEFG'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
> // $cfg['Servers'][$i]['controlhost'] = '';
> // $cfg['Servers'][$i]['table_uiprefs'] = 'pma_table_uiprefs';
> // $cfg['Servers'][$i]['recent'] = 'pma_recent';
> // $cfg['Servers'][$i]['table_uiprefs'] = 'pma_table_uiprefs';

4. cd to the latest release directory which is named phpMyAdmin-LATEST_RELEASE_ID-english. This should have been created when you untarred the install file. Do an ll *inc* to see the files you will be working with (should only be one right now).

5. cp

6. From the current working version phpMyAdmin directory, cp -p to the latest release directory but name the file with the appropriate version number.

7. do a diff on the latest version and current working version of note any differences.

8. cp -p the current working version of into the latest directory.

9. make a copy of the file you just copied in and rename it to the latest version

10. merge in any differences noted in step 7.

11. When finished merging the changes, cp -p the file to

12. cd to the webserver root directory and point phpmy to latest phpMyAdmin release with a symbolic link:

ln -s phpMyAdmin-LATEST_RELEASE_ID-english phpmy

13. Login to the phpMyAdmin webpage as root and verify everything is working properly. If there are problems, check the documentation that is provided at the bottom of the main login page. Some scripts are also found in the installation "examples" directory that can be run (usually as user root, on a particular database).

Some old notes

< //
< // create control user and password
< // then go into phpmyadmin and edit their privileges for the mysql/user and mysql/db
< // tables as directed below
< //
< // Adding new users
< //
< //
< // When importing a database, you may need to edit /etc/php.ini to allow large files
< // to be uploaded into the web server.  Then restart httpd.
installing_phpmyadmin_tips.txt · Last modified: 2022/01/24 14:08 by juckins