Hi Everyone,
Super newbie here at DO and anything command line. I followed all of the basic steps for setting up a droplet and completed the setup of UFW as well. When following the LEMP setup guide, I am stuck in the section where I must tell sql to create a directory structure by entering:
sudo mysql_install_db
I’m not sure why but I am generating the following upon entering it:
FATAL ERROR: Neither host ‘droplet_name’ nor ‘localhost’ could be looked up with /usr/bin/resolveip Please configure the ‘hostname’ command to return a correct hostname. If you want to solve this at a later stage, restart this script with the --force option
Can someone shed some light as to why this is happening or provide a potential solution?
Appreciate any help!
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!
As the error indicates, you seem to have somehow misconfigured the hostname on your Droplet. Have you edited the /etc/hosts file? Make sure its contents include:
127.0.1.1 droplet-name
127.0.0.1 localhost
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.