Click here to Skip to main content
15,911,789 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
I am creating a desktop application using C# in .net 3.5 and MySql as database. I am very new to MySql and do not know how to connect .net application with MySql database.

Please reply me as soon as possible.

Thanks in advance.
Posted
Updated 2-Mar-11 11:52am
v4

Download the .Net provider for MySQL

http://www.mysql.com/products/connector/[^]

Once downloaded, set a reference to the dll in your project

Create a connection string for the provider & open your connection!

Connection Strings
http://www.connectionstrings.com/mysql#p28[^]

Create Connection Samples
http://bitdaddys.com/MySQL-ConnectorNet.html[^]
 
Share this answer
 
v2
Comments
Sandeep Mewara 2-Mar-11 13:47pm    
Good answer. 5!
Good you asked. There are plenty of resources out there. For starters let us look at this CP article
Connecting to MySQL database from your .NET applications.[^]

Then of course there is this http://dev.mysql.com/tech-resources/articles/dotnet/index.html[^], and yes, don't forget this valuable tool [^]as well.
 
Share this answer
 
Comments
Sandeep Mewara 2-Mar-11 13:47pm    
Good answer. 5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900