By confused5000
In Terminal, I run the code: mysql_secure_installation, then it asks me for this:
Enter current password for root (enter for none):
It said earlier: The passwords for MySQL have been saved to: /root/.digitalocean_password
So I typed this in: cat /root/.digitalocean_password to retrieve that password.
But then I got this: cat: /root/.digitalocean_password: No such file or directory
I’m really lost. How do I get the MySQL password if I get the error of “No such file or directory?” All help is appreciated, thanks
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!
I’ve just tried to spin up a LAMP 16.04 (on NYC2), and it shows the password in that file. If you run this:
ls -la /root/
You should get a list of 4 files and 2 directories:
.bashrc
.cache
.cloud-locale-test.skip
.digitalocean_password
.profile
.ssh
Otherwise you can reset the MySQL root password by following this tutorial: https://www.digitalocean.com/community/tutorials/how-to-reset-your-mysql-or-mariadb-root-password
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.