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';
Share this post
Link to post
Share on other sites