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
相关推荐
z06.6 小时前
MySQL索引
数据库·mysql
lzx_0029 小时前
Linux 进程(二) 深入理解进程
linux
沫璃染墨9 小时前
从零入门计算机网络系列(十二):HTTP长连接与会话管理详解——从Connection到Cookie与Session
linux·服务器·c++·tcp/ip·ubuntu·http·交互
温暖小土9 小时前
在 CentOS 上安装 Redis Stack
linux·redis·centos
CCIE-Yasuo10 小时前
网络安全-学习数据库-Mysql-2
数据库·学习·mysql
GeW11 小时前
国产化替代进入深水区之后Linux 与数据库为什么必须走向重建
linux
这个DBA有点耶11 小时前
云数据库半夜卡顿,CPU才30%?深挖云盘IOPS突发限制与内核挂起机制
数据库·mysql·云原生
女神下凡14 小时前
芯参谋(85):Linux_PPI_NAND_驱动开发指南
linux·运维·arm开发·驱动开发·单片机·嵌入式硬件·设计规范
12.=0.15 小时前
【持续更新】shell脚本 + Linux命令
linux·运维·服务器
xixingzhe215 小时前
MySQL 锁表故障排查与处理
数据库·mysql