mysql密码过期的修改方法(your password has expired)
来源:互联网 发布:微信手机商城源码 编辑:程序博客网 时间:2024/06/06 14:02
注明mysql版本:V5.7.10
遇到此问题,网上搜索了一下,没有找到切中要害的说明,整理如下。
情况一:如果是本机的mysql过期。
请使用root用户命令行登录(命令行登录不存在过期)。
登陆后直接输入 > set password = password('123456');
再次使用客户端访问,发现可用。
情况二:如果是服务器mysql过期。
这种情况需要修改指定用户的password。
以root@% 为例 > set password for 'root'@'%' = password('123456');
再次使用客户端访问,发现可用。
需要说明几点搜索到的坑
1、以下这种方式不能解决密码过期问题
update mysql.user set authentication_string=password('123456') where user='root' and Host = '%';
2、修改password_last_changed不能解决密码过期问题。
3、mysql早前的版本user表有password字段,5.7为authentication_string。
4、不需要重启mysql服务器。
5、提醒一下,root@localhost和root@%不是同一个用户。
查看用户信息的sql如下,方便读者复制:
select host,user,password_last_changed from mysql.user;
阅读全文
0 0
- mysql密码过期的修改方法(your password has expired)
- mysql your password has expired
- mysql your password has expired
- Oracle 11g 密码过期问题 (password has expired)
- Oracle密码过期the password has expired
- Oracle the password has expired -密码过期
- Oracle密码过期the password has expired
- Oracle密码过期the password has expired
- Oracle密码过期the password has expired
- Oracle密码过期the password has expired
- Oracle密码过期the password has expired
- Oracle密码过期the password has expired
- mysql错误:your password has expired..
- Your password has expired的解决办法
- ORA-28001: the password has expired Oracle 密码过期
- Oracle密码过期ORA-28001: the password has expired解决办法
- Oracle密码过期the password has expired解决办法
- ora-28001 the password has expired......oracle11g数据库密码过期
- 一对多 group by 后 查询 count(*) ,但是 count(*)=0的不能显示
- java 通过正则表达式获取匹配字符串的例子
- 影响JavaScript应用可扩展性因素
- Linux 学习(四)--- 虚拟机服务器网络架构图(NAT 模式)
- 深入学习BroadcastReceiver
- mysql密码过期的修改方法(your password has expired)
- Gitlab实现项目版本管理
- cdh搭建
- jdk1.7之ArrayList
- C++----表达式
- TCP/IP 协议栈及 OSI 参考模型详解
- 查看mysql表是如何被创建的
- Logstash日志收集实践
- pandas map()用法