Click here to Skip to main content
15,867,956 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
what could be the connection string when i try to connect with mysql database using c# and .net
Posted
Comments
RaviRanjanKr 4-Jan-12 18:01pm    
Google Please :)

 
Share this answer
 
Comments
fjdiewornncalwe 4-Jan-12 15:14pm    
Beat me to it... +5
Wendelius 4-Jan-12 15:20pm    
Thanks :)
Monjurul Habib 4-Jan-12 17:03pm    
always like , 5!
Wendelius 4-Jan-12 18:41pm    
Thanks :)
RaviRanjanKr 4-Jan-12 18:08pm    
Perfect Link, My 5+
You need to add Reference of "MySql.Data" and then need to write your code as
using MySql.Data.MySqlClient;
MySqlConnection con = new MySqlConnection("server=localhost;database=yourdatabase;uid=root;password=yourpassword");
con.Open(); // connection must be openned for command


you will fine plenty of article related to connection string for mySQl in C#
Connecting to MySQL Database using C# [^]
 
Share this answer
 

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