By edsilv
Hi,
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:
https://gist.github.com/edsilv/cd249a1788c8baf533002c16b6ad6a3d
And after running sudo mysql_install db I get:
Neither host 'srbska' nor 'localhost' could be looked up with /usr/bin/resolveip Please configure the 'hostname' command to return a correct hostname.
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.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
This question was answered by @edsilv:
When creating the droplet from the snapshot, I’d neglected to set the same SSH key as the one used on the account I copied it from. Recreating it with the same key fixed the issue.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.