mysql5.7 root password change

mysqld_safe --skip-grant-tables &
update mysql.user set authentication_string=password('Root_1234') where user='root';
flush privileges
killall -TERM mysqld

systemctl start mysqld
then, mysql -uroot -pRoot_1234
ALTER USER 'root'@'localhost' IDENTIFIED BY 'Root_1234';
flush privileges;

or else, it will report error, you must execute alter user before you use it .

 

posted on 2016-09-20 14:41  tneduts  阅读(231)  评论(5编辑  收藏  举报

导航