CentOS 修改MySQL密码

CentOS 修改MySQL密码

1.登录MySQL
2.执行如下命令

update user set password=password('mivbAs7Awc') where user='root';

报错如下:

Unknown column ‘password’ in ‘field list’

3.执行如下命令

update user set password=password('mivbAs7Awc') where user='root'

碰到bug

ERROR 1819 (HY000): Your password does not satisfy the current policy
requirements

执行如下命令

set global validate_password_policy=LOW;
mysql> update mysql.user set authentication_string=PASSWORD('mivbAs7Awc') where User='root';

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> quit;
Bye

你可能感兴趣的:(centos,mysql,linux)