简体   繁体   English

允许通过C#访问安装在Amazon EC2上的MySQL服务器

[英]Allow access to MySQL server installed on Amazon EC2 through C#

I have installed a mysql server 5.5 on amazon EC2 machine. 我已经在Amazon EC2机器上安装了mysql服务器5.5。 But cannot connect to it using C# using mysql-connecter-for-.net I used: 但是无法使用我使用的mysql-connecter-for-.net使用C#连接到它:

Hostname = IP Address of EC2 machine.
Port = 3306
username =
password = 

But, it fires up error: "The connection must be open and valid". 但是,它会引发错误:“连接必须打开且有效”。

I can't find any tutorial over internet. 我在互联网上找不到任何教程。 Please guide. 请指导。

You need to edit your EC2 instance's security group. 您需要编辑EC2实例的安全组。 Add a MySQL entry with specify IP address (0.0.0.0/32 will accept connection from any IP address). 添加一个具有指定IP地址的MySQL条目(0.0.0.0/32将接受来自任何IP地址的连接)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM