MySQL5.7出现Your password has expired. To log in you must change it using a client that supports expir
2017-04-06 10:16
681 查看
简介
今天晚上本来想写bootstrap-fileinput插件集成fastdfs的文章,但是刚启动idea里面的QiYuAdmin就出现了错误:Your password has expired. To log in you must change it using a client that supports expired passwords.其实只需要修改密码就可以了,这个问题我找到了以下解决办法:
1、修改 /etc/my.cnf,在 [mysqld] 小节下添加一行:skip-grant-tables=1
这一行配置让 mysqld 启动时不对密码进行验证
2、重启 mysqld 服务:systemctl restart mysqld
3、使用 root 用户登录到
MySQL:mysql -u root
4、切换到mysql数据库,更新 user 表:
update mysql.user set authentication_string=password(‘root’) where user=’root’ and Host = ‘localhost’;
在之前的版本中,密码字段的字段名是 password,5.7版本改为了 authentication_string
5、退出 mysql,编辑 /etc/my.cnf 文件,删除 skip-grant-tables=1 的内容
6、重启 mysqld 服务,再用新密码登录。但此时还是不行哦,我以为可以了,就没有往下看了。其实还有最后一步。
7、alter user ‘root’@’localhost’ identified by ‘root’;
有个疑问,不知道为什么程序是一直链接不上的,但是客户端,比如Navcat和MySQL的WorkBench都是可以链接上的?最后一段我是直接在Navcat里面执行的,别忘记了flush privileges;
转自山竹之七语:MySQL5.7出现Your password has expired. To log in you must change it using a client that supports expir
相关文章推荐
- MySQL5.7出现Your password has expired. To log in you must change it using a client that supports expir
- [mysql] ERROR 1862 (HY000): Your password has expired. To log in you must change it using a client that supports expired passwords.
- mysql-1862、1820、java.sql.SQLException: Your password has expired. To log in you must change it using a client that supports expired passwords.
- 【MySQL】MySQL 5.7 "Your password has expired.To log in you must change it using a client that suppor"
- Your password has expired. To log in you must change it using a client that supports expired passwor
- Your password has expired.To log in you must change it using a client that supports expired password
- Your password has expired. To log in you must change it using a client that supports expired passwords.
- Your password has expired. To log in you must change it using a client that supports expired pass...
- Your password has expired.To log in you must change it using a client that supports expired password
- Your password has expired. To log in you must change it using a client that supports expired passwor
- Your password has expired. To log in you must change it using a client that supports expired passwor
- Your password has expired. To log in you must change it using a client that supports expired passwor
- Your password has expired.To log in you must change it using a client that supports expired password
- 【完美】Your password has expired. To log in you must change it using a client that supports expired pas
- Mysql 5.7 错误号码1862 Your password has expired. To log in you must change it using a client...
- Your password has expired.To log in you must change it using a client that supports expired password
- Your password has expired.To log in you must change it using a client that supports expired password
- Your password has expired. To log in you must change it using a client that supports expired passwor
- java.sql.SQLException: Your password has expired. To log in you must change it using a client that s
- mysql 5.7 To log in you must change it using a client that supports expired passwords