您的位置:首页 > 运维架构 > Linux

CentOS6.5 登录mysql 运行SQL语句总是报错解决

2016-03-23 16:25 671 查看
会报:

centos6.5 Access denied for user 'root'@'localhost' (using password: NO)

mysqladmin: unable to change password; error: 'Your password does not satisfy the current policy req

You must reset your password using ALTER USER statement before executing this statement.

Warning: Since password will be sent to server in plain text, use ssl connection to ensure password 

ERROR 1819 (HY000): Your password does not satisfy the current policy requirements  等,mysql5.7安装时会产生随机密码;

解决方法:

进入mysql

set global validate_password_policy=0; //解决密码复杂度验证

SET PASSWORD = PASSWORD('your new password');//设置新密码

flush privileges;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  CentOS6.5 mysql