Background
I'm following this tutorial, but instead of using SQL Compact, I'd like to use MySQL. I'm having trouble with the connection string needed for this connection.
I've installed MySQL Connector v6.4.4.
I'm now trying to compose the connection string.
Where I'm stuck
I'm trying to create a Controller by right-clicking Controllers > Add Controller. I select the Movie Model and the MovieDBContext Context. I receive an error saying "Unable to retrieve metadata".
Connection strings attempted
I've tried the basic connection string in hopes that Entity would automatically try to use the MySQL connector:
Server=localhost;Database=MovieDB;Uid=root;Pwd=pass;
I've tried the method used here, and I get another "Unable to retrieve metadata" error.
Is there any way to make this work with MySQL?
The important part is: MySql.Data.MySqlClient
<add name="MovieDBContext"
connectionString="Server=localhost;Database=MovieDB;Uid=root;Pwd=pass;"
providerName="MySql.Data.MySqlClient"/>
I know... the question is old, but I tripped over this aswell, so here the answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With