sudo apt install mysql-server && sudo apt install mysql-client
sudo apt update && sudo apt install phpmyadmin php-mbstring
// abort installation
sudo mysql or mysql -u root -p // root first
mysql > UNINSTALL COMPONENT "file://component_validate_password";
mysql > exit
sudo apt install phpmyadmin
sudo mysql
mysql > INSTALL COMPONENT "file://component_validate_password";
mysql > exit
sudo phpenmod mbstring
sudo systemctl restart apache2
// Customizing User Authentication and Privilege
sudo mysql
mysql > SELECT user,authentication_string,plugin,host FROM mysql.user;
mysql > ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'password';
// Configuring Password Access for Dedicated MySQL Users
mysql > CREATE USER 'sammy'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'password';
// or
mysql > ALTER USER 'sammy'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
mysql > GRANT ALL PRIVILEGES ON *.* TO 'sammy'@'localhost' WITH GRANT OPTION;
mysql > exit