connect mysql from outside server

先增加用户:

grant all privileges on *.* to dev@"%" identified by 'dev' with grant option;
grant all privileges on *.* to dev@"localhost" identitied by  'dev' with grant option;
flush privileges

修改绑定本机:

cd /etc/mysql
vim my.conf

直接注释“bind-address = 127.0.0.1” 即可~

测试

标签:mysql