If this is the first time you have logged into your server through this manner, you will be prompted to accept the identification of this server. Once you do this and are logged in, perform the following commands to reset the administrator password.
Step.1
#service mysqld stop
Step.2
#/usr/bin/mysqld_safe --skip-grant-tables &
This starts the MySQL daemon in the background and skips the authentication mechanisms.
Step.3
#mysq
Step.4
#use mysql;
Step.5
#update user set password=password('newpassword') where user='root' and host='localhost';
Question
Dev Blaze
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.