Skip to content

Instantly share code, notes, and snippets.

@zyjibmcn
Last active December 26, 2016 03:13
Show Gist options
  • Save zyjibmcn/a6b480415101a9392e6e8b241f0f2941 to your computer and use it in GitHub Desktop.
Save zyjibmcn/a6b480415101a9392e6e8b241f0f2941 to your computer and use it in GitHub Desktop.
mysql 安装配置问题
1. root登录mysql出错
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
由于需要注意5.7.* 之后的版本,需要找到初始密码,登录后修改密码:
```
$ sudo grep 'temporary password' /var/log/mysqld.log
$ mysql -uroot -p
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass$';
```
2. 修改密码失败
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
```
mysql> set global validate_password_policy=0;
```
参考:
http://stackoverflow.com/questions/21944936/error-1045-28000-access-denied-for-user-rootlocalhost-using-password-y
http://www.cnblogs.com/ivictor/p/5142809.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment