I am trying to use MySQL database in MVCMusicStore
http://mvcmusicstore.codeplex.com/ instead of MSSQL.
I would like to learn the first code development with MySQL.
I added this code to web.config
<connectionStrings> <add name="MusicStoreEntities" connectionString="Server=localhost; Database=MvcMusicStore; Uid=root; Pwd=;" providerName="MySql.Data.MySqlClient"/> </connectionStrings> <system.data> <DbProviderFactories> <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.3.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" /> </DbProviderFactories> </system.data>
The MySQL database has already been created, but tables are not created. I just added the link Mysql.Data.MySQLClient.dll to my project. And I have such an exception:
An error occurred while creating the configuration section handler for system.data:
The column "InvariantName" is limited to unique. The value "MySql.Data.MySqlClient" is already present.
(C: \ Users \ Dauren \ Downloads \ MvcMusicStore-v3.0 \ MvcMusicStore-v3.0 \ MvcMusicStore-Completed \ MvcMusicStore \ web.config line 47)
source share