向子网上的所有计算机授予mysql访问权限 [英] Granting mysql access rights to all machines on subnet

查看:77
本文介绍了向子网上的所有计算机授予mysql访问权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个运行在Windows上的mysql实例(和架构),可以通过基于本地主机的连接字符串作为服务器进行访问。

I have a mysql instance (and schema) running on windows that I can access via a connection string based on localhost as the server.

现在我想成为

如果可能,我想使用一个用户,但允许它从同一子网中的任何计算机访问。

If possible I would like to use a single user but allow it to access from any machine on the same subnet.

如何为此设置安全性?
(我已经打开了相关的防火墙端口)

how do I setup security for this? (I already opened the relevant firewall port)

谢谢,
Eyal

Thanks, Eyal

推荐答案

您可以这样操作:

GRANT ALL PRIVILEGES ON mydb TO 'username'@'192.168.1.0/255.255.255.0';

相应地更改子网和IP

change subnet and IP accordingly

这篇关于向子网上的所有计算机授予mysql访问权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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