Table of content
  1. Basic
  2. Advanced

To simplify phpMyAdmin configuration, we consider it is to be installed on the same host as the MySQL database, so localhost will be used for communication and no encryption will be set.

Build information

Ensure the following options:

databases/phpmyadmin5
1
2
3
4
5
6
7
8
9
10
[x] BZ2       PHP bzip2 library support
[x] CURL      PHP curl support
[x] GD        PHP GD library support (requires X11)
[x] GMP       PHP GMP library support
[x] MBSTRING  PHP Multi-byte String support
[x] OPCACHE   PHP Opcache support
[x] OPENSSL   PHP OpenSSL support
[x] SODIUM    PHP libsodium support (only available for PHP >= 7.2)
[x] ZIP       PHP Zip compression support
[x] ZLIB      PHP ZLIB support

Basic

The following information will be added in the config.inc.php file:

config.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  /* Global configuration */
  $cfg['blowfish_secret'               ] = 'use_your_own_random_string';

  /* Servers configuration */
  $i = 0;

  /* First serveur */
  $i++;
  $cfg['Servers'][$i]['socket'         ] = '/tmp/mysql.sock';
//$cfg['Servers'][$i]['host'           ] = '127.0.0.1';
  $cfg['Servers'][$i]['extension'      ] = 'mysqli';
  $cfg['Servers'][$i]['connect_type'   ] = 'tcp';
//$cfg['Servers'][$i]['ssl'            ] = false;     // Enable if SSL required
  $cfg['Servers'][$i]['compress'       ] = false;
  $cfg['Servers'][$i]['auth_type'      ] = 'cookie';

Advanced

It possible to enable extra features of phpMyAdmin, by using a dedicated database, this table will be named phpmyadmin, creation and access rights are done as follow:

  1. Creating database and the required tables

    1
    
    mysql -p < /usr/local/www/phpMyAdmin/examples/create_tables.sql
    
  2. Giving access rights to pma user on localhost:

    1
    2
    
    GRANT USAGE ON *.* TO 'pma'@'localhost' IDENTIFIED BY 'use_a_real_password'
    GRANT SELECT, INSERT, UPDATE, DELETE ON `phpmyadmin`.* TO 'pma'@'localhost'
    

Adding the corresponding configuration in config.inc.php:

config.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
  $cfg['Servers'][$i]['controluser'     ] = 'pma';
  $cfg['Servers'][$i]['controlpass'     ] = 'use_a_real_password';

  $cfg['Servers'][$i]['pmadb'           ] = 'phpmyadmin';
  $cfg['Servers'][$i]['relation'        ] = 'pma__relation';
  $cfg['Servers'][$i]['table_info'      ] = 'pma__table_info';
  $cfg['Servers'][$i]['column_info'     ] = 'pma__column_info';
  $cfg['Servers'][$i]['designer_coords' ] = 'pma__designer_coords';
  $cfg['Servers'][$i]['table_coords'    ] = 'pma__table_coords';
  $cfg['Servers'][$i]['pdf_pages'       ] = 'pma__pdf_pages';
  $cfg['Servers'][$i]['bookmarktable'   ] = 'pma__bookmark';
  $cfg['Servers'][$i]['tracking'        ] = 'pma__tracking';
  $cfg['Servers'][$i]['history'         ] = 'pma__history';
  $cfg['Servers'][$i]['userconfig'      ] = 'pma__userconfig';
  $cfg['Servers'][$i]['table_uiprefs'   ] = 'pma__table_uiprefs';
  $cfg['Servers'][$i]['recent'          ] = 'pma__recent';
  $cfg['Servers'][$i]['favorite'        ] = 'pma__favorite';
  $cfg['Servers'][$i]['users'           ] = 'pma__users';
  $cfg['Servers'][$i]['usergroups'      ] = 'pma__usergroups';
  $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
  $cfg['Servers'][$i]['savedsearches'   ] = 'pma__savedsearches';
  $cfg['Servers'][$i]['central_columns' ] = 'pma__central_columns';