Your password has expired. To log in you must change it using a client that supports expired passwords
密码失效
解决方法:跳过密码进入mysql
1、修改mysql配置文件
vi /usr/local/mysql/support-files/my-default.cnf
在[mysqld]下输入skip-grant-tables保存
cp /usr/local/mysql/support-files/my-default.cnf /etc/my.cnf
复制
2、重启mysql服务
service mysqld restart
3、重新登录mysql,密码直接回车
mysql -u -root -p
use mysql;
update user set password=password("新密码") where user="root";
(如果找不到password字段,则用authentication_string)
flush privileges; 刷新数据库
quit;
4、删除配置文件里的skip-grant-tables保存,复制
5、重启mysql服务