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
相关推荐
Johny_Zhao20 分钟前
阿里云平台健康检查巡检清单-运维篇
linux·网络安全·阿里云·信息安全·云计算·shell·系统运维
来自于狂人33 分钟前
CentOS 镜像源配置与 EOL 后的应对策略
linux·运维·centos
博语小屋1 小时前
进程初识之进程状态
linux
果冻kk2 小时前
MySQL MVCC:并发神器背后的原理解析
数据库·mysql
吉凶以情迁2 小时前
window服务相关问题探索 go语言服务开发探索调试
linux·服务器·开发语言·网络·golang
喜欢敲代码的程序员3 小时前
SpringBoot+Mybatis+MySQL+Vue+ElementUI前后端分离版:日志管理(四)集成Spring Security
spring boot·mysql·spring·vue·mybatis
柏木乃一3 小时前
Linux初步认识与指令与权限
linux·运维·服务器·shell·权限
Joemt3 小时前
ubuntu源码编译安装cmake高版本、pybind11安装、crow使用
linux·运维·ubuntu
huohuopro4 小时前
在linux(ubuntu)服务器上安装NTQQ并使用
linux·ubuntu