0

I am currently facing a issue of how to migrate the database for user information which is created by default in VS 2012. When I create a project, a LocalDb\v11.0 is created with all user tables and database.

In my application I want to use MySQL as database. I am able to run, connect and access MySQL database running on MySQL workbench. But I am facing this issue of how to migrate User Access Controls i.e, Account Controllers and Home Controller are already given; Currently when I press on Login I am redirected to a page to enter my login credentials. Which uses this default SQL Express LocalDb.

I want to use the code functionality which is provided to me by Microsoft but want to use a MySQL database.

I am currently thinking of migrating from default SQL db in which Account/user tables are, to MySQL and then operate code with MySQL database. There is no specific post which targets this issue. I am really clueless now, can someone give some pointers as of where to start?

   <add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-ImageRepository-20140121114624;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-ImageRepository-20140121114624.mdf" providerName="System.Data.SqlClient" />

I am thinking of making this Default Connection to point to mySQL Db that I have but this is not working.

1 Answers1

0

you will need to modify your connection string to connect to your mysql database.

you will find more info here

mySQL DataSource on Visual Studio 2012

if you are using entity framework in your project it will be compatible with mysql.

Community
  • 1
  • 1
Matt Tabor
  • 1,053
  • 8
  • 10
  • Hello Matt, I am able to add a connection string with MySQL database that I have created in my machine. Issue is I want to use the already created Account/User control features which are provided to me. When make a new project and replace the default connection string to one I have created it starts saying that there is some error with the connection string. I can also tell you the specifics of the error. – Rituraj Singh Chauhan Feb 23 '14 at 15:02