MySql is a free open-source database server. Thus, many people would like to use it with in
ASP.Net pages to cut the cost of their projects.
It’s pretty easy to connect ASP.Net pages to MySQL database. First you have to have MySQL
database and the MySQL ODBC Driver.
You can download MySQL:
http://dev.mysql.com/downloads/mysql/5.0.html
And the MySQL ODBC Driver here:
http://dev.mysql.com/downloads/connector/odbc/5.1.html
Also, you can download the MySQL GUI tools here:
http://dev.mysql.com/downloads/gui-tools/5.0.html
The GUI tools will make it easy to create database, tables, columns, and so on. Now it’s time
to connect your ASP.NET project to a MySQL Database.
In your asp.net page, import the following name space:
<%@ Import Namespace="System.Data.ODBC" %>
Create a ODBCDataConnection , and set the connection string to:
"Driver={MySQL ODBC 5.1 Driver};uid=username;password=pass;Server=servername;
Option=16834;Database=dbname;" Test your connection. Done!
Now you can use the database classes such as ODBCDataAdapter, ODBCDataReader, to manipulate
your data in your ASP.Net pages
Happy coding!




