Ubuntu Server 15.10 打开mysql远程访问(3306端口)

Ubuntu 打开Mysql 3306远程访问 最近在Ubuntu Server 15.10配置mysql服务器,发现不能远程访问(ps:已建立一个可以远程访问的用户)。

  • 1、查看3306端口是否正常
    netstat -an|grep 3306
    Ubuntu Server 15.10 打开mysql远程访问(3306端口)
    文章图片
  • 2、修改mysql配置文件(记住是mysqld.cnf,不是my.cnf)
    vim /etc/mysql/mysql.cnf.d/mysqld.cnf
    Ubuntu Server 15.10 打开mysql远程访问(3306端口)
    文章图片
  • 3、将 bind-address =127.0.0.1 这句注释掉
    Ubuntu Server 15.10 打开mysql远程访问(3306端口)
    文章图片
  • 4、再次查看端口信息
    netstat -an|grep 3306
    Ubuntu Server 15.10 打开mysql远程访问(3306端口)
    文章图片

    【Ubuntu Server 15.10 打开mysql远程访问(3306端口)】现在试试远程就ok了!!!

    推荐阅读