MySql Data Provider

This version of the Enterprise Library MySQL Data Provider was tested against the MySQL Database v5.1.34
and uses the MySQL data provider v6.0.3 downloaded separately.

The MySQL database, client tools and .NET data provider can all be downloaded from http://dev.mysql.com/downloads and are licence free.

The following is an example of a configuration file using a MySQL Data Provider:

[XML]
<?xml version="1.0" encoding="utf-8"?>
<configuration>
	<configSections>
		<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
	</configSections>
	<dataConfiguration defaultDatabase="Service_Dflt">
		<providerMappings>
			<add databaseType="EntLibContrib.Data.MySql.MySqlDatabase, EntLibContrib.Data.MySql, Version=4.1.0.0, Culture=neutral, PublicKeyToken=null" name="MySql.Data.MySqlClient" />
		</providerMappings>
	</dataConfiguration>
	<connectionStrings>
		<add	name="Service_Dflt"
			providerName="MySql.Data.MySqlClient"
			connectionString="database=northwind;uid=root;" />
		<add	name="NewDatabase"
			providerName="MySql.Data.MySqlClient"
			connectionString="database=northwind;uid=root;charset=utf8;"/>
		<add	name="DbWithMySQLAuthn"
			providerName="MySql.Data.MySqlClient"
			connectionString="database=northwind;uid=entlib;pwd=********"/>
		<add	name="NwindPersistFalse"
			providerName="MySql.Data.MySqlClient"
			connectionString="database=northwind;uid=entlib;pwd=********;Persist Security Info=false"/>
	</connectionStrings>
</configuration>

Last edited Dec 22, 2009 at 8:30 PM by ewdev, version 4

Comments

granadaCoder Sep 10, 2013 at 3:40 PM 
For 5.0. Check this answer:

http://stackoverflow.com/questions/4030436/activation-error-occured-while-trying-to-get-instance-of-type-database-key/18666918#18666918

and here:

http://searchcode.com/codesearch/view/14385662

gr8tushar Jan 21, 2011 at 4:02 AM 
Hi,
Does this work with Ent Lib 5.0 ?