This is an old revision of the document!
Debian 10/11, other than Debian 9, require manual installation of phpmyadmin, phpmyadmin has been removed from Debian's repositories.
$ wget https://files.phpmyadmin.net/phpMyAdmin/5.2.0/phpMyAdmin-5.2.0-english.tar.gz
apache.conf
later) and set ownership:$ tar xvf phpMyAdmin-5.2.0-english.tar.gz sudo mv phpMyAdmin-5.2.0-english/ /home/user/html/phpMyAdmin $ sudo chown -R www-data:www-data /home/user/html/phpMyAdmin
/home/user/html/phpMyAdmin
).sudo mkdir -m770 /home/user/html/phpMyAdmin/tmp
config.sample.inc.php
to config.inc.php
and edit as follows$ sudo vim /home/user/html/phpMyAdmin/config.inc.php $cfg['blowfish_secret'] = 'new 32 byte secret key';
config.inc.php
:$cfg['FirstLevelNavigationItems'] = 150;// number of databases in navigation, default: 100 $cfg['MaxNavigationItems'] = 150; // number of tables in db navigation, default: 50 $cfg['NavigationWidth'] = 300; // width of the navigation window, default: 240 $cfg['RetainQueryBox'] = true; // retain query box, results of query shown below box, default: false $cfg['ShowPhpInfo'] = true; // show phpinfo link on home screen, default: false
cd /etc/apache2/conf-available ln -s ../../phpmyadmin/apache.conf phpmyadmin.conf cd ../conf-enabled ln -s ../conf-available/phpmyadmin.conf phpmyadmin.conf
cd /usr/share/phpmyadmin ln -s /etc/phpmyadmin/config.inc.php config.inc.php ln -s /etc/phpmyadmin/config.header.inc.php config.header.inc.php ln -s /etc/phpmyadmin/config.footer.inc.php config.footer.inc.php
vim /etc/phpmyadmin/conf.d/tempdir.php <?php $cfg['TempDir'] = '/var/lib/phpmyadmin/tmp';
mysql -u <my-admin-user> -p SELECT user,host FROM mysql.user; CREATE USER 'user'@'localhost' IDENTIFIED BY 'password'; GRANT USAGE ON phpmyadmin.* TO phpmyadmin
sudo chown root:www-data /etc/phpmyadmin/config-db.php sudo chmod 640 /etc/phpmyadmin/config-db.php
sudo mariadb GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION; exit
cd /usr/share/phpmyadmin/ sudo wget https://files.phpmyadmin.net/phpMyAdmin/5.1.0/phpMyAdmin-5.1.0-english.tar.gz tar xzf phpMyAdmin-5.1.0-english.tar.gz sudo mv phpMyAdmin-5.1.0-english phpmyadmin
define('TEMP_DIR', '/var/lib/phpmyadmin/tmp/'); define('CONFIG_DIR', '/etc/phpmyadmin/');
Edit /etc/apache2/conf-available/phpmyadmin.conf:
Alias /phpmyadmin /usr/share/phpmyadmin <Directory /usr/share/phpmyadmin> Options FollowSymLinks DirectoryIndex index.php # Allow user to access without password Include conf-available/user-access.conf <IfModule mod_php5.c> <IfModule mod_mime.c> AddType application/x-httpd-php .php </IfModule> <FilesMatch ".+\.php$"> SetHandler application/x-httpd-php </FilesMatch> php_flag magic_quotes_gpc Off php_flag track_vars On php_flag register_globals Off php_admin_flag allow_url_fopen Off php_value include_path . php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/javascript/:/usr/share/php/tcpdf/ </IfModule> </Directory>
conf-available/user-access.conf contains:
# Allow user to access without password Require ip www.xx.yyy.zzz