I am trying to create a web app using ASP.Net MVC3, Entity Framework and MySQL.
I have added the following code to my Web.Config file.
May be the error is in your connection string. Have you tried to connect to your DB instance using the above log in. try changing the connection string
connectionString="Data Source=.;Initial Catalog=contacts;Integrated Security=True uid=root;pwd=password;" providerName="MySql.Data.MySqlClient"/>
use above if you are using sql server, else if you are using sql express use below one
connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=contacts;Integrated Security=True uid=root;pwd=password;" providerName="MySql.Data.MySqlClient"/>
Even though this is answered, but I have experienced the same problem and my in case it was in the connection string; I had the part "Integrated Security" when I really shouldn't have used it; I was relying on the database authentication.
I removed the "Integrated Security=True" part and it worked perfectly :)