Connection String to connect to mysql setup under Ubuntu in Amazon EC2

允我心安 提交于 2019-12-13 20:59:12

问题


Hihi, 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?

I am using Entity Framework 4. Thanks in advance!


回答1:


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" />

:)



来源:https://stackoverflow.com/questions/6855653/connection-string-to-connect-to-mysql-setup-under-ubuntu-in-amazon-ec2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!