连接字符串在Amazon EC2上的Ubuntu下连接到MySQL安装 [英] Connection String to connect to mysql setup under Ubuntu in Amazon EC2

查看:144
本文介绍了连接字符串在Amazon EC2上的Ubuntu下连接到MySQL安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

日冰,我已经安装一个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" />

:)

这篇关于连接字符串在Amazon EC2上的Ubuntu下连接到MySQL安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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