连接字符串在Amazon EC2上的Ubuntu下连接到MySQL安装字符串、连接到、Amazon、Ubuntu

由网友(今天一定要早睡)分享简介:日冰,我已经安装一个Ubuntu实例在Amazon EC2上,我有在Ubuntu下安装的MySQL。想问一下,我怎么能我的外部asp.net应用程序连接到这个MySQL数据库?应该用什么连接模样?Hi I have setup an Ubuntu instance in Amazon EC2, and I have...

日冰,我已经安装一个Ubuntu实例在Amazon EC2上,我有在Ubuntu下安装的MySQL。想问一下,我怎么能我的外部asp.net应用程序连接到这个MySQL数据库?应该用什么连接模样?

Hi I have setup an Ubuntu instance in Amazon EC2, and I have setup MySQL under Ubuntu. Would like to ask, how can I connect my external asp.net application to this MySQL database? What should be the connection look like?

我使用实体框架4。在此先感谢!

I am using Entity Framework 4. Thanks in advance!

推荐答案

想通了连接字符串格式如下:

Have figured out the connection string format as follow:

<add name="ejabberdEntities" connectionString="metadata=res://*/ejabberdDB.csdl|res://*/ejabberdDB.ssdl|res://*/ejabberdDB.msl;provider=MySql.Data.MySqlClient;provider connection string=&quot;server=ec2-xx-xx-xxx-xx.compute-x.amazonaws.com;User Id=dbuser;Password=dbpassword;database=ejabberdDB;Port=3306;Persist Security Info=True&quot;" providerName="System.Data.EntityClient" />

:)

阅读全文

相关推荐

最新文章