Reset mysql root password

MySQL Server -- Posted on Oct. 18, 2018

Reset mysql root password

              
                use mysql;
SET PASSWORD FOR 'root'@'localhost' = PASSWORD("pass");
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'Current-Root-Password';
FLUSH PRIVILEGES;
quit;

service mysql restart
mysql -u root -p
                  
   
            

Related Posts