Signup · Login
Stardeveloper.com  
Home · Tutorials · Forums · ASP.NET Newsletter Application · Web Hosting Plans · Faisal Khan's Blog · Contact
Search Stardeveloper.com
Newsletter
Enter your email address to receive full length articles at Stardeveloper:


Article Categories
.NET  .NET
  ASP (16)
  ASP.NET (41)
  ADO (16)
  ADO.NET (11)
  COM (6)
  Web Services (4)
  C# (1)
  VB.NET (3)
  IIS (2)

J2EE  J2EE
  JSP (15)
  Servlets (9)
  Web Services (1)
  EJB (4)
  JDBC (4)
  E-Commerce (1)
  J2ME (1)
  Products (1)
  Applets (1)
  Patterns (1)
Log In
UserName Or Email:

Password:

Auto-Login:

Miscellaneous Links
  Submit Article
Stardeveloper RSS Feed
Hosted by Securewebs.com
 
Home : .NET : ADO.NET : Accessing MySQL Database with ASP.NET
 
RSS - Read full length articles at Stardeveloper using Stardeveloper RSS Feed RSS

Accessing MySQL Database with ASP.NET

by Faisal Khan. Follow Faisal Khan on Twitter Follow Faisal Khan on Facebook

Overview
In this step by step tutorial we will learn how to obtain, install, configure and run MySQL database on Windows. We will then move on to create a table in MySQL database, populate this table with some records and then display those records in the browser using an ASP.NET page.

This tutorial assumes no prior experience with MySQL, though basic knowledge of SQL syntax will be useful. It is assumed that you have a working ASP.NET/IIS installation on your system and you know how to create and view an ASP.NET page. For some beginner ASP.NET articles, have a look at our ASP.NET section.

All examples assume a working installation of IIS 5.0/6.0 and ASP.NET 1.1 on Windows 2000 or above (Windows XP, Windows Server 2003). To obtain information on installing IIS 5.0 and ASP.NET 1.1 move over to ASP.NET web site. The techniques discussed in this article for obtaining, installing, configuring and running MySQL will work the same across almost all versions of Windows (including Windows 98), but installing it as a service and running the ASP.NET page will require NT based Windows systems.

Topics covered in this article:

  1. Why use MySQL on Windows?
  2. Obtaining and Installing MySQL.
  3. Configuring and Running MySQL.
  4. Setting root password and removing ghost account.
  5. Installing, Uninstalling MySQL as a Windows service.
  6. Creating a new table in MySQL database and populating it with some records.
  7. Creating the ASP.NET page to display those records.

Why use MySQL on Windows?
MySQL is the most popular free and opensource database used across all major operating systems from UNIX to Windows. It provides ease of installation, simplicity and fast data access to an array of clients from Java based systems to .NET applications.

Using it on Windows has several advantages:

  • Comes for free! - Unlike other production level database systems for Windows like SQL Server and Oracle, MySQL comes for free. Looking at the huge license fees of these commercial RDBMS, it is virtually impossible for a single person or small groups of users to afford their license fees. MySQL comes to rescue!
  • Very fast data access! - Not like SQL Server, but still very fast. Access database is no match for MySQL. You'll know it's speed when you use it.
  • Very stable and used by large number of organizations! - Although it offers no real support (besides the ones by some free online forums and usenet sites), it mostly doesn't need any. You can though obtain commercial support from the MySQL AB company itself if you want to. MySQL is used by large number of organizations Worldwide from small Gigabyte databases to huge storage systems in Terabytes.
  • Very popular among developers! - Developers simply love it. Why? use it and you'll know.
  • Cross platform! - Use it on Windows, or get a dedicated box running Linux/FreeBSD (which are again free Operating Systems), choice is yours.

 ( 9 Remaining ) Next

Comments/Questions ( Threads: 27, Comments: 57 )
    Contains 1 or more replies by the Author of this Article.
    Contains 1 or more replies by Faisal Khan.

  1. Connectvity issue
  2. Any modifications because of .NET 2.0
  3. DB Backup ( 1 Reply )
  4. More information on this great and simple article to fill up a few gaps
  5. .Net DatabaseHandler 1.1
  6. MxDataGrid
  7. Accessing MySQL database
  8. Connection to Oracle with out DSN from VB.6
  9. Create Table in VB.net for mySQL table from Asp.Net page
  10. facing problem on copy the database
  11. Great article
  12. Example in VB.NET ( 2 Replies )
  13. How to start IIS? ( 2 Replies ) This thread contains 1 reply by the Author of this Article. This thread contains 1 reply by Faisal Khan.
  14. How can I start IIS? ( 1 Reply ) This thread contains 1 reply by the Author of this Article. This thread contains 1 reply by Faisal Khan.
  15. Client does not support authentication protocol requested by server ERROR ( 1 Reply )
  16. Acclaim for this article ( 2 Replies ) This thread contains 1 reply by the Author of this Article. This thread contains 1 reply by Faisal Khan.
  17. mysqld-max-nt --console Error ( 1 Reply )
  18. How can i connect MYSQL with ASP.NET (VB)? ( 3 Replies )
  19. Getting back to C:\ prompt
  20. Visual studio .NET - seperate code file
  21. displaynames.aspx only displays header not table
  22. Error while setting up MySQL NT Daemon ( 1 Reply )
  23. Error while running script ( 9 Replies )
  24. getting started ( 2 Replies ) This thread contains 1 reply by the Author of this Article. This thread contains 1 reply by Faisal Khan.
  25. Starting the manual service ( 1 Reply ) This thread contains 1 reply by the Author of this Article. This thread contains 1 reply by Faisal Khan.
  26. Problem Shutting down ( 3 Replies )
  27. Security and HIPAA requirements ( 1 Reply )

Post Comments/Questions

In order to post questions/comments, you must be logged-in. If you are not a member yet, then signup, otherwise login. Once you login then come back to this page and you'll see a form right here which will allow you to post comments/questions.

Please note, one of the benefits of signing up is to be notified immediately by email everytime you receive a reply to the thread you have subscribed.

 
© 1999 - 2010 Stardeveloper.com, All Rights Reserved.