2012-07-25 58 views
0

可能重複:
How do I setup ASP.NET MVC 2 with MySQL?帶MySQL數據庫的ASP.NET配置?

嗨,我創建並配置一個MySQL數據庫,並正在使用ASP.NET MVC框架。什麼是我應該用來連接數據庫的連接字符串?

任何人都可以提出一個教程或書籍資源,我可以使用?

+0

可能的重複:http://stackoverflow.com/questions/2512852/how-do-i-setup-asp-net-mvc-2-with-mysql或http://stackoverflow.com/questions/3252949 /是什麼 - 是 - 錯用,這對MySQL的連接字符串 – aleafonso 2012-09-13 10:11:42

回答

1
<connectionStrings>  
    <add name="LocalMySqlServer" connectionString="Data Source=localhost;Database=xxxxx;User Id=xxxxx;Password=xxxxxxxx;" providerName="MySQL.Data.MySqlClient"/> 
</connectionStrings> 

希望這有助於!