2

I currently run a PHP website which uses MYSQL for the database but now I what to move the website to MVC .Net environment but can't figure out how to this is what I am trying:

I Installed MYSQL.data.Entity, EF, and Web through Nuget package

then I added the connection string in the web.config file:

<connectionStrings>
    <add name="constr" connectionString="Data Source=localhost;Initial Catalog=SampleDB;User Id=root;password=''"/>
</connectionStrings>

Password is left empty because there is no password on the database as I running it locally to test it

after all that I still cant view the Database I Server Explorer? should I be able to view the database in server explorer?

How can I make it work?

(also note I took the live database and put it into local)

1
  • VS usually maps your connection string to one in Server Explorer. You can also try manually adding the connection string through Server Explorer > Data Connections, right-click > "Add Connection..." and try entering the details that way? Commented Jun 23, 2016 at 10:49

1 Answer 1

2

You are not mentioning the mySql Connector for .NET. https://dev.mysql.com/downloads/connector/net/

Install it and it should start working ;)

Sign up to request clarification or add additional context in comments.

4 Comments

Can I install that through Nuget package or is the only way to install it through the installer?
@user3689285 Install from the package manager I think, you will need to modify your web config though
Nope still cant connect to it, is it because I'm running MYSQL/phpmyadmin through WAMP? which I have started?
Try connecting using MySql Administrator. Can you get that working?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.