When Installing Mysql on Linux, sometimes it will not prompt for passwords (eg: ssh installation), in such cases you can recover the password by:
1) Stop the mysql service
2) Run mysqld_safe ----skip-grant-tables
3) Then use mysql -u root and loginto the database
4) Then use the update command to change the password :
mysql> update user set password=PASSWORD("NEW-PASSWORD") where User='root';
5) Quit and stop mysqld_safe.
6) Start the mysql Service.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.