MySQL 允许从特定域访问?

标签 mysql linux

我正在尝试允许访问我在本地服务器上运行的 MySQL 实例。我知道我可以将远程访问绑定(bind)到 my.cnf 文件中的某些 IP 和某些 IP 范围。我很好奇是否可以允许从整个域进行访问,而不必列出所有可能连接的 IP。

我知道您可以通过 GRANT 命令授予对整个域的访问权限,但我想我的断开连接是 my.cnf 文件如何处理它的。

例子如果我

GRANT ALL PRIVILEGES ON mydatabase.* to jsmith@'somedomain' IDENTIFIED BY 'jimspassword';

但是在 my.cnf 文件中没有绑定(bind)任何 IP 是否仍然有效?

谢谢你的帮助

最佳答案

根据 GRANT Syntax 记录:

 Account Names and Passwords

[ deletia ]

You can specify wildcards in the host name. For example, <em>user_name</em>@'%.example.com' applies to user_name for any host in the example.com domain, and <em>user_name</em>@'192.168.1.%' applies to user_name for any host in the 192.168.1 class C subnet.

关于MySQL 允许从特定域访问?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17089526/

相关文章:

php - 带过滤器的排名系统

mysql - MySQL 中的多值属性

mysql - 外键力独特

php - 我如何在我的数据库中配对图像?

linux - 尝试在 CDH-5.4.2 中安装 hbase

mysql - 尝试用vb.net连接mysql

c - 为什么 thread_info 应该是 task_struct 中的第一个元素?

windows - 在 Linux 机器上创建 Windows (XP) 安装程序?

linux - 服务器运行在 linux 内核中。 listen 是否应该在线程中发生?

linux - read -p 与2>/dev/null 组合时不提示字符串,这是为什么呢?