I have long since forgotten the password for the root user on one of my boxes. Is there a way I can change it without having to log in to the instance, or will I have to reinstall?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Step 1
Stop database:
Step 2
Restart database
Access to database is only possible through it’s sock file ‘/var/lib/mysql/mysql.sock’.
Step 3
Connect to the database and change password:
If you want to, show all users:
Set new password:
Leave database connection:
Step 4
Restart database server ‘normally’.