By AgmLauncher
When ssh into the droplet as root, I am able to just type mysql and launch MySQL anonymously.
I then exited, and ran mysql_secure_installation, and followed all the prompts to remove the anonymous user, and set a root password.
I then stopped mysql using /etc/init.d/mysql stop and started it back up again /etc/init.d/mysql start
I then typed mysql again, and was still able to have full access to mysql anonymously as the root OS user. I expected to be denied access.
Keeping mysql running, I ran mysql_secure_installation again, and was NOT prompted to enter my current password.
Stopping mysql and then running mysql_secure_installation, I WAS prompted to enter my current password, but because the service had been stopped, it was not able to do anything.
What am I doing wrong?
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!
Running the mysql command alone as root sources the file /root/.my.cnf, which might contain the actual login/password. So check inside that file for possible credentials.
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.