1 配置文件中my.cnf 的配置项msqld下面增加
skip-grant-tables
2 mysql -u root 登进去
切换mysql数据库
use mysq
密码置空
UPDATE user SET authentication_string = ‘‘ WHERE User = ‘root‘;
退出后重启mysql服务
登陆
mysql -u root -p
回车
设置弱口令
set global validate_password.policy=0;
ALTER user [email protected] identified by ‘simplepass‘;
flush privileges;
https://stackoverflow.com/questions/5555328/error-1396-hy000-operation-create-user-failed-for-jacklocalhost
drop user [email protected];
flush privileges;
create user [email protected] identified by ‘admins_password‘
原文:https://www.cnblogs.com/wolbo/p/13656660.html