Networking MariaDB未在0.0.0.0上侦听

Networking MariaDB未在0.0.0.0上侦听,networking,mariadb,ubuntu-16.04,Networking,Mariadb,Ubuntu 16.04,这是运行Ubuntu 16.04的VPS上的MariaDB/MySQL版本: mysql版本15.1发行版10.0.29-MariaDB,用于使用readline 5.2的debian linux gnu(x86_64) 这可能是/etc/mysql/mariadb.conf.d/50 server.cnf的相关内容: 1 # 2 # These groups are read by MariaDB server. 3 # Use it for options that only

这是运行Ubuntu 16.04的VPS上的MariaDB/MySQL版本:
mysql版本15.1发行版10.0.29-MariaDB,用于使用readline 5.2的debian linux gnu(x86_64)

这可能是
/etc/mysql/mariadb.conf.d/50 server.cnf
的相关内容:

  1 #
  2 # These groups are read by MariaDB server.
  3 # Use it for options that only the server (but not clients) should see
  4 #
  5 # See the examples of server my.cnf files in /usr/share/mysql/
  6 #
  7 
  8 # this is read by the standalone daemon and embedded servers
  9 [server]
 10 
 11 # this is only for the mysqld standalone daemon
 12 [mysqld]
 13 
 14 #
 15 # * Basic Settings
 16 #
 17 user    = mysql
 18 pid-file  = /var/run/mysqld/mysqld.pid
 19 socket    = /var/run/mysqld/mysqld.sock
 20 port    = 3306
 21 basedir   = /usr
 22 datadir   = /var/lib/mysql
 23 tmpdir    = /tmp
 24 lc-messages-dir = /usr/share/mysql
 25 skip-external-locking
 26 
 27 # Instead of skip-networking the default is now to listen only on
 28 # localhost which is more compatible and is not less secure.
 29 bind-address    = 0.0.0.0 #This is line changed by me from 127.0.0.1
 30 
在使用
systemctl stop mysql
systemctl start mysql
之后,这仍然是我的
netstat-nat | grep:3306
的输出:

tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:3306          127.0.0.1:54316         ESTABLISHED
tcp        0      0 127.0.0.1:3306          127.0.0.1:58456         ESTABLISHED
tcp        0      0 127.0.0.1:3306          127.0.0.1:58466         ESTABLISHED
tcp        0      0 127.0.0.1:3306          127.0.0.1:58458         ESTABLISHED
tcp        0      0 127.0.0.1:3306          127.0.0.1:58454         ESTABLISHED
tcp        0      0 127.0.0.1:3306          127.0.0.1:58460         ESTABLISHED
tcp        0      0 127.0.0.1:3306          127.0.0.1:58444         ESTABLISHED
tcp        0      0 127.0.0.1:3306          127.0.0.1:58452         ESTABLISHED
tcp        0      0 127.0.0.1:3306          127.0.0.1:58446         ESTABLISHED
tcp        0      0 127.0.0.1:3306          127.0.0.1:58462         ESTABLISHED
tcp        0      0 127.0.0.1:3306          127.0.0.1:58464         ESTABLISHED
tcp        0      0 127.0.0.1:3306          127.0.0.1:58450         ESTABLISHED
tcp        0      0 127.0.0.1:3306          127.0.0.1:58468         ESTABLISHED

正如您在第一行中看到的,它仍在收听
127.0.0.1
,而不是
0.0.0
。我可能会错在哪里?TIA

请记住:@Hackerman谢谢,我知道这件事。我只想在同一个MySQL实例上连接两个不同的VP,它们位于两个不同的IP地址上。接下来我打算使用防火墙:)@Hackerman再次感谢,我用SSH隧道完成了这项工作:)我在LinuxMint上遇到了与MariaDB相同的问题(相同的maria版本,相同的配置,相同的netstat结果)。除了SSH隧道之外还有其他解决方案吗?对于生产环境来说,这不是一个好的解决方案,但对于开发人员来说已经足够了。如果有人搜索“如何创建SSH隧道”:SSH-L 0.0.0:3308:localhost:3306yourlinuxusername@127.0.0.1