By justin600310
When I attempt to run: sudo mysql -uroot -p and enter my password, I am prompted with the following error message: ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES) I’ve deleted and rebuilt my droplet twice now thinking I fat-fingered the password when I changed it using this command: sudo mysqladmin -u root -p’password’ password mynewpassword
I’ve tried the purge option from this page: https://help.ubuntu.com/community/MysqlPasswordReset but it must not be clearing the password as it fails to set the new password when I re-install mySQL. I also tried the reset a root password section from this page: https://www.digitalocean.com/community/articles/how-to-import-and-export-databases-and-reset-a-root-password-in-mysql but when I run this command: sudo mysqld_safe --skip-grant-tables & it appears to hang.
Any suggestions? Thanks, Justin
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!
What about trying the command without the ’ <br> <br>Thus doing this: sudo mysqladmin -u root -ppassword password mynewpassword
I guess the command: <br>sudo mysqld_safe --skip-grant-tables & <br>wasn’t hanging. <br>I let it sit for about 20 minutes and it still appeared to be hung, but I pressed [Enter] and it returned me to my ~$ prompt. I continued with the instructions provided and was able to successfully reset the root password. <br> <br>Guess I was just impatient? <br> <br>Thanks, <br>Justin
Its possible but it also could have been a slow install as well. Anything is possible these days.
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.