Please bear with me. I'm trying to provision a virtual server with LAMP. I'm using Ubuntu 20.04.
First, I tried installing this package lamp-server^
Everything seemed good to go, except that I couldn't pull up /phpmyadmin on my browser, i.e. [my server's IP address]/phpmyadmin was throwing a 500 error.
I forgot everything I did to solve the issue, but one thing was to create a symlink in /var/www or /var/www/html for "phpmyadmin". I also linked phpmyadmin with apache2, i.e. create a symlink (this was actually done automatically by dbconfig-common during the installation)
So, after not getting anywhere. I decided to --purge remove lamp-server^
Next, I decided to install all components separately. Apache gets installed with no problems and I can verify it in my browser by going to my server's public IP address.
The problem is when I get to mysql-server. Firstly, I don't get a prompt to create a root password during the installation. To correct this, I ran mysql_secure_installation and it lets me input a password, but it doesn't work when I test it with mysql -u root -p.
So, after 3 or 4 failed mysql-server installation attempts, I get the following errors when trying to start the service (please see image)
Other stuff I have done to try and reset the mysql root password:
Access Denied for User 'root'@'localhost' (using password: YES) - No Privileges?
To conclude, I'd like to start from scrath with a clean slate. I have removed the package with --purge and then ran autoremove. But I think the previous installations are messing up the new ones because I get some errors every time I try install a fresh instance of mysql-server.
Any help would be appreciated.