mysql - 不允许通过 IISExpress 连接到 Mysql 服务器

标签 mysql asp.net vb.net iis-express

当通过 iisexpress 服务器连接到本地主机上的 mysql 服务器时,出现以下错误:

iisexpress.exe Error: 0 : Host 'MyPcName' is not allowed to connect to this MySQL server

但问题是它只发生在某些连接上,并且连接或/和任务之间没有真正的区别。

这是mysql的问题还是iisexpress的问题?我如何知道它是什么并修复它?

我正在使用 MySQL Connector Net 6.7.4、Visual Studio 2013 和 XAMPP 1.8.2。

最佳答案

取自 reference manual :

f the following error occurs when you try to connect from a host other than the one on which the MySQL server is running, it means that there is no row in the user table with a Host value that matches the client host:

Host ... is not allowed to connect to this MySQL server

You can fix this by setting up an account for the combination of client host name and user name that you are using when trying to connect.

If you do not know the IP address or host name of the machine from which you are connecting, you should put a row with '%' as the Host column value in the user table. After trying to connect from the client machine, use a SELECT USER() query to see how you really did connect. Then change the '%' in the user table row to the actual host name that shows up in the log. Otherwise, your system is left insecure because it permits connections from any host for the given user name.

关于mysql - 不允许通过 IISExpress 连接到 Mysql 服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21017966/

相关文章:

C# Webforms 在代码执行期间显示加载指示器

javascript - jquery.load 函数

php - 为 PHP sql 查询指定参数

MySql Workbench 无法打开 SSH 隧道

mysql - 分组依据 - 返回零计数

asp.net - 最佳实践 - 从代码隐藏中设置 jQuery 属性

vb.net - 将字符串列表转换为对象

asp.net - 如何检查页面上的所有复选框?

.net - 获取嵌入式资源

php - 在Android中,当数据更改为数据库时如何显示消息?