创建用户
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