sudo systemctl stop mysqld
sudo systemctl set-environment MYSQLD_OPTS=”--skip-grant-tables”
sudo systemctl start mysqld
sudo mysql -u root
mysql> FLUSH PRIVILEGES;
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'NewRootPassw0rd!';
mysql> FLUSH PRIVILEGES;
mysql> QUIT;
sudo systemctl stop mysqld
sudo systemctl unset-environment MYSQLD_OPTS
sudo systemctl start mysqld
sudo mysql -u root -p
mysql> QUIT;
sudo mysql -u root -p
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'ChangeRootPassw0rd!';
mysql> ALTER USER 'shola'@'localhost' IDENTIFIED BY 'ChangeSholaPassw0rd!';
mysql> FLUSH PRIVILEGES;
mysql> QUIT;
Now login again with new root password !!
No comments:
Post a Comment