绑定地址和MySQL服务器 [英] Bind address and MySQL server

查看:121
本文介绍了绑定地址和MySQL服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试配置MySQL服务器时遇到了绑定地址.我为什么要配置绑定地址的详细信息,请参见下面的链接.

I came across the bind address while trying to configure the MySQL server. The details of why I want to configure the bind address is in the link below.

多个主机名和多个特权?

现在,我想了解绑定地址的用途.从某种意义上说,绑定地址是我们分配给托管MySQL服务器的计算机的地址吗?

Now, I want to understand the purpose of the bind address. In the sense, is a binding address the address we assign to the machine that is hosting the MySQL server? 

我不知道.如果有人可以向我解释其目的,那将非常有帮助.另外,将0.0.0.0分配给绑定地址是否会造成安全漏洞/漏洞?

I have no clue. Would be really helpful if someone could explain me the purpose of it. Also, will assigning 0.0.0.0 to the binding address create any security flaws/loop holes?

推荐答案

在bind中指定的地址告诉MySQL在哪里监听. 0.0.0.0是一个特殊地址,表示绑定到每个可用网络".

The address you specify in bind tells MySQL where to listen. 0.0.0.0 is a special address, which means "bind to every available network".

仅允许使用能够使用"bind"选项中指定的相同地址打开与服务器的连接的客户端软件进行连接.

Only client software which is able to open a connection to the server using the same address that is specified in the 'bind' option will be allowed to connect.

一些例子:

  • 如果MySQL绑定到127.0.0.1,则 同一台计算机上只有软件 将能够连接(因为 127.0.0.1始终是本地计算机).
  • 如果MySQL绑定到 192.168.0.2(并且服务器计算机的IP地址为 192.168.0.2,并且它位于/24子网中),那么同一台计算机上的所有计算机 子网(以192.168.0开头的任何子网)都可以连接.
  • 如果MySQL绑定到 0.0.0.0,则可以访问服务器计算机的任何计算机 通过网络将能够连接.
  • If MySQL binds to 127.0.0.1, then only software on the same computer will be able to connect (because 127.0.0.1 is always the local computer).
  • If MySQL binds to 192.168.0.2 (and the server computer's IP address is 192.168.0.2 and it's on a /24 subnet), then any computers on the same subnet (anything that starts with 192.168.0) will be able to connect.
  • If MySQL binds to 0.0.0.0, then any computer which is able to reach the server computer over the network will be able to connect.

这些都是传输级别的连接.远程计算机仍然需要符合应用程序级别的条件,也就是说,它们仍将需要正确的登录凭据和mysql.user中的主机参数.

These are all transport-level connections. Remote computers still need to qualify for application-level, which is to say they will still require the correct login credentials and host parameters from mysql.user.

这篇关于绑定地址和MySQL服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆