CentOS 修改MySQL密码

CentOS 修改MySQL密码

1.登录MySQL

2.执行如下命令

bash 复制代码
update user set password=password('mivbAs7Awc') where user='root';

报错如下:

Unknown column 'password' in 'field list'

3.执行如下命令

bash 复制代码
update user set password=password('mivbAs7Awc') where user='root'

碰到bug

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

requirements

执行如下命令

bash 复制代码
set global validate_password_policy=LOW;
bash 复制代码
mysql> update mysql.user set authentication_string=PASSWORD('mivbAs7Awc') where User='root';
bash 复制代码
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> quit;
Bye
相关推荐
wgl6665205 分钟前
Linux---基础IO!
linux·运维·服务器
Ancelin安心24 分钟前
kali-dirsearch的使用
linux·运维·服务器·python·计算机网络·web安全·网络安全
IT利刃出鞘1 小时前
VMware--解决vmdk越来越大的问题(vmdk瘦身)
linux·ubuntu·vmware
wdfk_prog2 小时前
[Linux]学习笔记系列 -- [driver]base
linux·笔记·学习
月光下的麦克2 小时前
如何查案动态库版本
linux·运维·c++
benyuanone2 小时前
MySQL环境项目迁移成国产化达梦环境
数据库·mysql
Vallelonga2 小时前
使用 busybox 制作磁盘镜像文件
linux·经验分享
EndingCoder2 小时前
索引类型和 keyof 操作符
linux·运维·前端·javascript·ubuntu·typescript
尽兴-2 小时前
MySQL索引优化:从理论到实战
数据库·mysql·优化·b+树·索引·最左前缀
石小千2 小时前
Linux清除缓存
linux·运维