Mysql初始化操作

忘记密码,修改my.cnf

[mysqld]

 skip-grant-tables=1

重设密码

use mysql

UPDATE user SET Password = password ( '123456' ) WHERE User = 'root' ; 

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;

flush privileges; 

猜你喜欢

转载自blog.csdn.net/templarzq/article/details/82777173