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
相关推荐
一只小bit1 天前
MySQL常用内置函数整理:提高你的查询效率
数据库·mysql·数据完整性·表约束
盛世隐者1 天前
【Linux】定制Linux系统
linux·运维·服务器
-Excalibur-1 天前
形象解释关于TCP/IP模型——层层封装MAC数据帧的过程
linux·c语言·网络·笔记·单片机·网络协议·tcp/ip
小跌—1 天前
Linux:数据链路层
linux·网络
用户31187945592181 天前
Fedora 37 安装 libicu-71.1-2.fc37.x86_64.rpm 教程(命令行步骤)
linux
搬砖的小码农_Sky1 天前
Linux(Ubuntu)操作系统下文件的解压
linux·ubuntu
bug攻城狮1 天前
SaaS多租户架构实践:字段隔离方案(共享数据库+共享Schema)
mysql·架构·mybatis·springboot·1024程序员节
景彡先生1 天前
Python函数定义与调用全解析:从基础语法到实战技巧
linux·开发语言·python
Lxt.星翊1 天前
MySQL(安装和卸载、数据库存储原理图)
linux·运维·windows