# mysql8初始对密码要求高,简单的字符串不让改。先改成:MyNewPass@123;
alter user 'root'@'localhost' identified by 'MyNewPass@123';
# 降低密码难度
set global validate_password.policy=0;
set global validate_password.length=4;
# 修改成简易密码
alter user 'root'@'localhost'IDENTIFIED BY '1111';  

mysql5:

set password for 用户名@localhost = password('新密码'); 
mysqladmin -u用户名 -p旧密码 password 新密码  
update user set password=password('123') where user='root' and host='localhost';
# or grant

发表回复

您的电子邮箱地址不会被公开。

Captcha Code