WhyTo 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.
See also
- Requirement: MariaDB
- Reference: phpMyAdmin documentation
- Website: https://www.phpmyadmin.net/
Build information
Ensure the following options:
[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:
/* Global configuration */
$cfg['blowfish_secret' ] = Big 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:
-
Creating database and the required tables
mysql -p < /usr/local/www/phpMyAdmin/examples/create_tables.sql
-
Giving access rights to
pmauser onlocalhost:GRANT USAGE ON *.* TO 'pma'@Accessing host IDENTIFIED BY Password GRANT SELECT, INSERT, UPDATE, DELETE ON `phpmyadmin`.* TO 'pma'@Accessing Host
Adding the corresponding configuration in config.inc.php:
$cfg['Servers'][$i]['controluser' ] = 'pma';
$cfg['Servers'][$i]['controlpass' ] = 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';