远程访问mysql数据库

来源:互联网 发布:alex卞正伟淘宝店 编辑:程序博客网 时间:2024/05/11 09:43

最近数据库升级,遇到一些问题,

刚刚安装好mysql数据库后,默认是不支持远程访问的:

此时需要做的工作:

    1.增加用户权限

        grant all privileges on *.* to root@"%" identified by "password";
        flush privileges;

    2.打开firewall

        /sbin/iptables -A INPUT -i eth0 -p tcp --destination-port 3306 -j ACCEPT

        service iptables save

0 0