我正在尝试允许访问我在本地服务器上运行的 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 touser_name
for any host in theexample.com
domain, and<em>user_name</em>@'192.168.1.%'
applies touser_name
for any host in the192.168.1
class C subnet.
关于MySQL 允许从特定域访问?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17089526/