Mysql 5.7密码过期修改密码
来源:互联网 发布:淘宝达人简介怎么写 编辑:程序博客网 时间:2024/05/16 01:25
今天在运行项目的时候出现:“Your password has expired. To log in you must change it using a client that supports expired passwords”这个错误,自己一看才知道是数据库密码过期引起的,这也导致了navicat等工具链接并打不开数据库,唯一的途径只能是修改数据库密码啦!
自己摸索了一早上,在网上也找了好几种方法来解决,最便捷也最好的方法是用命令来修改密码:
1.找到自己mysql安装的路径,如:C:\Program Files\MySQL\MySQL Server 5.7\bin
2.打开命令窗口:cmd 并进入mysql安装的目录bin文件夹下
C:\>cd Program Files\MySQL\MySQL Server 5.7\bin
3.先用之前的密码登陆mysql后台
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysql -uroot -proot
mysql: [Warning] Using a password on the command line interface can be insecur
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.7.5-m15-log
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
4.进入mysql后你的所有操作都不会被成功执行,提示如下:
mysql> show databases;
ERROR 1820 (HY000): You must SET PASSWORD before executing this statement
5.上面的提示让你必须修改了密码才能进行后续的操作,现在用命令修改密码:
mysql> show databases;
ERROR 1820 (HY000): You must SET PASSWORD before executing this statement
6.当成功执行上面的sql语句,证明你的mysql密码修改成功,即你可以用新的密码来使用数据库啦
- Mysql 5.7密码过期修改密码
- mysql 5.7修改root密码 密码过期
- mysql 5.6 mysql 5.7修改root密码 密码过期
- mysql 5.6 修改默认密码和密码过期
- 修改oracle 密码过期
- Oracle密码过期修改
- mysql 密码过期
- MySql密码过期解决方法
- Mysql 密码过期
- mysql密码自动过期
- MySQL提示密码过期
- MySQL密码过期解决方法
- Mysql 5.7修改密码
- mysql 5.7 密码修改
- mysql 5.7修改密码
- mysql 5.7修改密码
- oracle 11g 密码过期|修改密码
- oracle修改密码,以及密码过期
- android listview 属性详解
- 结构体(Day-6)
- 蓝牙
- WPA入门 (三) —— 千变万化的图表
- 解锁android设备遇到错误bootloader Check 'Allow OEM Unlock' in Developer Options
- Mysql 5.7密码过期修改密码
- 树状数组
- Kinect入门(1)——显示彩色图像数据流
- Android开发在string.xml文件中设置部分字体颜色大小
- 图像拼接
- 循环队列的实现方法
- IOS根据两个经纬度计算相距距离
- C# 根据图片生成缩略图.直接输出到客户端.
- 机器学习那些事——文本挖掘中的特征提取