創建用戶
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