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
相关推荐
蝎子莱莱爱打怪2 小时前
ESXi 强制断电后恢复CentOS7虚拟机避坑指南:解决重复注册&目录清理难题
linux·后端·程序员
赵渝强老师3 小时前
【赵渝强老师】使用TiSpark在Spark中访问TiDB
数据库·mysql·tidb·国产数据库
xlp666hub1 天前
Leetcode第五题:用C++解决盛最多水的容器问题
linux·c++·leetcode
张宏2361 天前
原子操作 (基于Linux 应用层 C 语言)
linux
kymjs张涛2 天前
OpenClaw 学习小组:初识
android·linux·人工智能
程序设计实验室2 天前
经历分享,发现挖矿木马后,服务器快速备份与重装(腾讯云平台)
linux
Miku162 天前
OpenClaw-Linux+飞书官方Plugin安装指南
linux·人工智能·agent
Miku162 天前
OpenClaw 接入 QQ Bot 完整实践指南
linux·人工智能·agent
用户8307196840822 天前
Java 告别繁琐数据统计代码!MySQL 8 窗口函数真香
java·sql·mysql
stark张宇2 天前
MySQL 核心内幕:从索引原理、字段选型到日志机制与外键约束,一篇打通数据库任督二脉
数据库·mysql·架构