Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Friends,
I am using VS 2015 and Mysql Database
I have MVC Application and I want to connect to mysql database in another connection.
I couldn't get connection to it from the project.
My webconfig is
<add name="Web" connectionstring="Data Source=45.118.181.110:3306;Initial Catalog=testdb:3306;User ID=test;Password=test123" providername="MySql.Data.MySqlClient">

What I have tried:

<add name="Web" connectionString="Data Source=45.118.181.110:3306;Initial Catalog=testdb:3306;User ID=test;Password=test123" providerName="MySql.Data.MySqlClient" />
Posted
Updated 1-Jan-20 23:51pm
Comments
Richard MacCutchan 21-Dec-19 3:47am    
You need to provide more information about exactly what happens and where in your code the error is.

1 solution

Hello, check at this example :
https://medium.com/developer-diary/asp-net-mvc-5-with-entity-framework-and-mysql-code-first-migrations-6e315669b6b7[^]

you should have MySQL Connector for .net in order to work.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900