Hi
How to create connection to MySql using c#
Thanks
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Sep 2, 2011, 12:00 AM EDT
http://www.connectionstrings.com/mysql
Satyapriya NayakRank #47 · 31.5K reputationPosted Sep 2, 2011, 12:06 AM EDT
Please refer our recommended articles section.
Thanks
Jagjit Saini166 reputationPosted Sep 2, 2011, 1:25 AM EDT
VulpesRank #55 · 29.2K reputationPosted Sep 2, 2011, 1:32 AM EDT
I'd use one of those provided by MySql itself, say the ADO.NET driver:
http://www.mysql.com/products/connector/
Vilas GiteRank #951 · 2.1K reputationPosted Sep 2, 2011, 1:36 AM EDT
Hi!
Refer: http://www.c-sharpcorner.com/UploadFile/mahesh/81/
----------------------------------------------------------------------------
If this reply helps your post…then check "This is correct answer"
Jagjit Saini166 reputationPosted Sep 2, 2011, 1:37 AM EDT
Which mirror site should be selected.
Thanks
VulpesRank #55 · 29.2K reputationPosted Sep 2, 2011, 1:47 AM EDT
As you're in India, I'd choose one of the mirror sites in Asia, say the National Taiwan University.
Jagjit Saini166 reputationPosted Sep 2, 2011, 2:33 AM EDT
string ConnectionString = "SERVER=localhost;DATABASE=hr_mysql;uid=root@localhost;password=''";
But it is giving error message Access denied for the user @localhost to database ha
Thanks
VulpesRank #55 · 29.2K reputationPosted Sep 2, 2011, 2:52 AM EDT
Jagjit Saini166 reputationPosted Sep 2, 2011, 3:03 AM EDT
string
It is giving error after giving Port=80 : A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
How Port number is given , so that it should not give any problem.
Thanks
ConnectionString = "SERVER=localhost;DATABASE=hr_mysql;Port=80;Persist Security Info=False;uid=jagjit@localhost";VulpesRank #55 · 29.2K reputationPosted Sep 2, 2011, 4:38 AM EDT