-
Install LAMP
apt install apache2 php mariadb-server
-
Install PHP modules
apt install php-{mbstring,zip,gd,xml,pear,gettext,cgi,mysql} libapache2-mod-php
-
Download PHPMyAdmin
apt install wget
wget https://files.phpmyadmin.net/phpMyAdmin/5.0.4/phpMyAdmin-5.0.4-all-languages.tar.gz
-
Create phpmyadmin directory and copy everything in
mkdir /var/www/html/phpmyadmin
tar xzf phpMyAdmin-5.0.4-all-languages.tar.gz --strip-components=1 -C /var/www/html/phpmyadmin
-
Create PHPMyAdmin config
cp /var/www/html/phpmyadmin/config{.sample,}.inc.php
nano /var/www/html/phpmyadmin/config.inc.php
--> look for "AllowNoPassword" with Ctrl W setFALSE
onTRUE
it gives something like that:
$cfg['Servers'][$i]['AllowNoPassword'] = true;
-
Give the permissions from the config file (otherwise the config doesn't work, it's a PMA rule)
chmod 660 /var/www/html/phpmyadmin/config.inc.php
chown -R www-data:www-data /var/www/html/phpmyadmin
-
Restart apache
systemctl restart apache2
-
Allow root for PHPMyAdmin
mysql -u root
USE mysql;
UPDATE user SET plugin='mysql_native_password' WHERE User='root';
FLUSH PRIVILEGES;
exit;
Then restart mariadb systemctl restart mysql