How resolve lost Root user password of MYSQL in mac.
Root password reset .
Here I
am explaining to you how I got the
lost root password of the MYSQL
database.
Step 1) First shut down
the running data server . Use this command
sudo /usr/local/mysql/support-files/mysql.server stop
you may get the problem of shutting down server. Then you can run
and then start the server
Setp 2) Run the database
sever in safe mode .. For this use this command.
sudo mysqld_safe --skip-grant-tables &
Step 3) Change user- run
the command
mysql -uroot
Step
4) Flush all privilege
mysql> mysql flush privileges
Step 5 ) To reset password run
this command,
use mysql;
update user set authentication_string=PASSWORD(“tiger123”) where User='root';
flush privileges;
quit
For MySql version 8.0
- SET
PASSWORD FOR 'root'@'localhost' = 'auth_string';
- With
no FOR user clause, the statement sets the
password for the current user:
SET PASSWORD = 'auth_string';
Step 6) Log root user
mysql> mysql
–u root –p
How resolve lost Root user password of MYSQL in mac.
Reviewed by Mukesh Jha
on
2:14 AM
Rating:

No comments:
Add your comment