This is how I make a clean install of NOOBS with LAMP

Firstly, I put the 8Gb SD card in the reader. Then I copy and paste the NOOBS from my harddrive, to the SD card.

The the RPi is booting, and resizing the SD card. Whens that's done, I choose the smallest version, without any GUI. While that is downloading, I set up the keyboard and language from the menu at the bottom of the screen.

After a reboot, I log in and start raspi-config, to change the password, set hostname and enable ssh interface.

After yet another reboot, I can log in with ssh.

Now I run this command:

sudo apt-get update && sudo apt-get install -y apache2 mariadb-server phpmyadmin

This updates th APT listings, and installs Apache, mariadb and phpmyadmin.

No privileges in phpMyAdmin?

Credetials: Username: phpmyadmin Password: password entered at installation

If you do not get any privileges, you need to stop the databaseserver, try this:

sudo systemctl stop mariadb

Then you'll need to start it again, but this time, without any privileges:

sudo mysqld_safe --skip-grant-tables --skip-networking &

The ampersamp is for the serverto run in the background.