How to install LAMP on Debian 10 (Buster)

Originally published at: https://www.cyberciti.biz/faq/how-to-install-lamp-on-debian-10-buster/

How do I install a LAMP stack on Debian 10 (Buster)?

It’s a very useful article for a LAMP installation, but for logging in as root, mysql/mariadb requires sudo privileges:

sudo mysql -u root -p

Otherwise the login will be denied.