Last post Dec 22, 2014 09:06 AM by vppai29
Dec 13, 2014 09:15 PM|vppai29|LINK
I am creating one web application mini project using asp.net in visual studio 2010 ,i want to know code and procedure for connecting mysql to asp.net using ado.net.
So please send the code as early as possible.
Dec 13, 2014 09:45 PM|Glenn Saint|LINK
Hi there, you will need the MySQL connector. Check it here http://dev.mysql.com/downloads/connector/net.
Hope that helps.
Dec 13, 2014 10:06 PM|vppai29|LINK
Hi Glenn ,
I have installed my sql connector but i dont know the code and step for connecting mysql..Please tell me how to achieve this.Thank you.
Dec 13, 2014 10:30 PM|Glenn Saint|LINK
Hi there, it's been a while I'm connecting to a MySQL server. It would be similar to ADO.NET, in MS-SQL you would use SqlConnection, in MySQL you would use MySqlConnection. Check it out here
http://dev.mysql.com/doc/connector-net/en/connector-net-programming.html, this would help you to speed up. Also make sure you add reference to MySQL assembly/DLL in your project.
For your connection string it can be found here http://dev.mysql.com/doc/connector-net/en/connector-net-programming-connecting-connection-string.html
I'm assuming you that you have knowledge in connecting to MS-SQL server using ADO.NET, am I right? Let us know if you do have other questions.
Dec 13, 2014 10:47 PM|vppai29|LINK
No. I dont know how to connect MS-SQL server using ADO.NET. I 'm new to .net and mysql.Please help me to resolve this issue..
Dec 13, 2014 11:56 PM|Glenn Saint|LINK
Hi there again, below are the links from MySQL, it would be worthwhile to read the following documents to have a better understanding on how you want to connect MYSQL database to .NET:
There are some examples in the above links, start from there and I believe you will be able to handle.
Let us know if you have some further questions, hope that helps.
Dec 14, 2014 02:23 AM|Careed|LINK
If you're using the MySQL .NET Connector, then your connection string should be as follows:
Dec 14, 2014 05:22 AM|vppai29|LINK
I have installed my-sql-net-6.9.5, and mysql work bench,after that i created front end using c# webform in .net and tried to connect to database in visual studio through
tools->connect to database->choose datasource, here it is not showing mysql database option.Please help to resolve this.
Dec 14, 2014 05:27 AM|vppai29|LINK
I have installed my-sql-net-6.9.5, and mysql work bench,after that i created front end using c# webform in .net and tried to connect to database in visual studio through tools->connect to database->choose datasource, here
it is not showing mysql database option.Please help to resolve this.
Dec 14, 2014 05:36 AM|sreejukg|LINK
Dec 14, 2014 09:13 AM|Careed|LINK
Take a look here: http://dev.mysql.com/tech-resources/articles/mysql-installer-for-windows.html
Dec 17, 2014 02:28 AM|Eileen ni - MSFT|LINK
Thanks for your post.
have installed my-sql-net-6.9.5, and mysql work bench
After installation is complete you need to open Windows Explorer and look for the MySql installation in the Program Files folder of your Windows drive.
There you will find a folder for MySQL Connector and inside that you will find the
MySql.Data.dll which you need to copy inside the BIN folder of your project.
#C# ASP.NET MySQL Connection Tutorial with MySQL Connector
#Use and connect to MySQL Database in ASP.Net Application using MySQLConnector
Hope this can be helpful.
Dec 22, 2014 09:06 AM|vppai29|LINK
Solution:- In this video Connection to mysql in Visual Studio is clearly provided ( ASP.net Web Forms website Part-1 Connect with Mysql Database connection https://www.youtube.com/watch?v=KIZqQgqYCIg )