2

Hy Guys,

How can I configure the webconfig to access a mysql db using MVC 3?

To use SQLExpress I included this code to configure in an example...

<add name="MovieDBContext"
     connectionString="Server=.\SQLEXPRESS;
     Database=Movies;Trusted_Connection=true"
     providerName="System.Data.SqlClient" />

I'm using Entity Framework.

PS.: I don't want to automatically create tables with the MVC. I want to create them manually.

Thks!

Thiago
  • 1,547
  • 3
  • 25
  • 40

1 Answers1

3

Take a look at this post, it seems like your best option is to use MySql Connector with EF

Using MySQL with Entity Framework

your connection string should look something like:

Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;

Community
  • 1
  • 1
Austin M
  • 594
  • 1
  • 4
  • 19