0

I have a server hosted by digital ocean with mysql installed. The password credential for the mysql root user is located in the root folder.

However, entering the password after mysql -u root -p leads to sorry, try again..

Funnily, if I do sudo mysql -u root, it'll log in automatically. I'm slightly uncomfortable with how easy it went.

I dont recall tampering with the root credentials. What is the root of the issue? How should things be reconfigured? I'm scared to change anything at risk of losing root access.

  • 2
    You may want to read this answer. In short, it's intended behavior. If a user is root, they can stop and restart mysql with no authentication options anyway... – vidarlo May 17 at 21:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.