-
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 wgetwget 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/phpmyadmintar 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.phpnano /var/www/html/phpmyadmin/config.inc.php--> look for "AllowNoPassword" with Ctrl W setFALSEonTRUEit 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.phpchown -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