sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm
sudo apt-get install apache2 mysql-server -y
sudo apt-get install software-properties-common -y
sudo add-apt-repository ppa:ondrej/php
sudo apt-get install phpmyadmin php-mbstring php-gettext -y
During the installation process, select Apache over lighttpd and select all positive options
Once installation is done run
sudo phpenmod mbstring
sudo systemctl restart apache2
sudo mysql
You can configure the root account to authenticate with a password by running the following command:
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
mysql> FLUSH PRIVILEGES;
Next, create a separate user with name phpmyadminuser to connect to phpMyAdmin. First, log in to MySQL shell:
mysql -u root -p
Then
CREATE USER 'phpmyadminuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'phpmyadminuser'@'localhost' WITH GRANT OPTION;
exit;