配置为 mysql root用户启用 unix 和 password 认证.note
# 作用:
远程连接mysql时使用密码,本地登陆时使用unix认证,无需密码,直接登录成功·为root启用 unix和 Password认证:
grant all privileges on *.* to 'root'@'localhost' identified via unix_socket;
grant all privileges on *.* to 'root'@'%' identified by 'Skills39';
flush privileges;
## 设置'root'@'localhost'为unix认证,'root'@'%' 为密码认证(在mysql中,'root'@'localhost' 和 'root'@'%' 实际上是两个不同的用户)查看:
