mysql 添加用户 多主机 授权 连接

创建用户

create user zhangsan identified by 'zhangsan';

授权

grant all privileges on *.* to zhangsan@'%' identified by 'zhangsan';

flush privileges;

mysql 授权成功后 ,总 连接不上,一下

 netstat -apn|grep 3306

tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN 

修改配置文件  ,注释掉 这行,重启

bind-address = 127.0.0.1

来源:https://www.cnblogs.com/pejsidney/p/8945934.html

原文地址:https://www.cnblogs.com/shaoyang0123/p/11242458.html