LAMP Stack tutorial fails at MySQL install on Ubuntu 14.04
I’ve been following this tutorial to install the LAMP stack on an Ubuntu 14.04 droplet:
Apache installs and I can see “it works” on my public IP.
However, when I get to the MySQL installation I get the following log:
And after running
sudo mysql_install db I get:
Neither host 'srbska' nor 'localhost' could be looked up with
Please configure the 'hostname' command to return a correct
Is this the error in the log I should be concerned with?
adduser: '/usr/bin/chfn -f MySQL Server mysql' returned error code 1. Exiting.
dpkg: error processing archive /var/cache/apt/archives/mysql-server-5.5_5.5.49-0ubuntu0.14.04.1_amd64.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
In the interests of staying consistent with your tutorial, I didn’t want to try any answers I find on the web for that error in case I just make it worse… :-)
If I run
service mysql start I get
mysql: unrecognized service
The droplet was created from a snapshot I’d taken from another account after following the basic setup procedures to enable SSH and a non-root sudo user.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×