Mysql-强制改密

2022/8/8 2:22:47

本文主要是介绍Mysql-强制改密,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

MySQL V8.0.22

[mysqld]

# 跳过登录验证
skip-grant-tables
use mysql;

update user set authentication_string = '' where User = 'root' and Host = 'localhost';

flush privileges;

-- 取消跳过登录验证,再进MySQL正常改密

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';

flush privileges;


这篇关于Mysql-强制改密的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程