绑定了本地地址,打开 /etc/mysql/my.cnf,找到:
bind-address = 127.0.0.1
去除 IP 地址绑定,把它改为:
bind-address = 0.0.0.0
然后重启 MySQL Server:
/etc/init.d/mysql restart
115.28.237.210
如果要设置为任何客户端都可以以root连接的话,可以这么写:
grant all on *.* to 'root'@'%' identifiied by '123456'
grant all on *.* to 'root'@'222.76.240.186' identified by '123456'
grant all on *.* to 'root'@'117.30.162.253' identified by '3134327408'
grant all on *.* to 'root'@'%' identified by '3134327408'
grant select on server.* to 'root'@'52.192.144.50' identified by '168'
grant select on server.* to 'root'@'222.76.240.186' identified by 'server'
grant all on *.* to username@'%' identified by 'password;
grant all on server.* to root@'%' identified by '123456';
grant all on server.* to root@'%' identified by '123456';
revoke all on *.* from 'root'@117.30.162.253;
flush privileges
bind-address = 127.0.0.1
去除 IP 地址绑定,把它改为:
bind-address = 0.0.0.0
然后重启 MySQL Server:
/etc/init.d/mysql restart
115.28.237.210
如果要设置为任何客户端都可以以root连接的话,可以这么写:
grant all on *.* to 'root'@'%' identifiied by '123456'
grant all on *.* to 'root'@'222.76.240.186' identified by '123456'
grant all on *.* to 'root'@'117.30.162.253' identified by '3134327408'
grant all on *.* to 'root'@'%' identified by '3134327408'
grant select on server.* to 'root'@'52.192.144.50' identified by '168'
grant select on server.* to 'root'@'222.76.240.186' identified by 'server'
grant all on *.* to username@'%' identified by 'password;
grant all on server.* to root@'%' identified by '123456';
grant all on server.* to root@'%' identified by '123456';
revoke all on *.* from 'root'@117.30.162.253;
flush privileges
show grants for root@localhost
select a.acc_id as '帐号', b.coin as '铜钱', b.ingot '元宝', b.bind_ingot as '绑元' from player as a join player_data as b on a.id = b.player_id where a.acc_id like "%bajian%";