Accessing MySQL Databases

MySQL is a widely used, multithreaded, multiuser, robust SQL database server. You can use MySQL for free under the GNU General Public License. You can download the MySQL database and its tools from After downloading the zipped file, you unzip it in a folder and run Setup.exe. By default the setup file installs MySQL in your C:/mysql folder. The Documentation section ( has detailed instructions on how to install and register the MySQL server and its services.


You may need Administrator rights to install and register the MySQL server and its services.

After installing MySQL, make sure it's running. If the service isn't running, you may need to start it manually. You can start it by selecting Control Panel Administrative Tools Services, right-clicking the MySql service, and then selecting the Start menu option. This action will start MySql as a service. Because in this chapter you'll be using ODBC to connect to a MySQL database, you need to install an ODBC driver for it. You can find the most widely used ODBC driver for MySQL, MyODBC, at

After downloading the zipped driver file, the obvious action is to unzip it and install it. If the driver is installed properly, you can see it from the ODBC Data Source Administrator by selecting Control Panel Data Source (ODBC). You must see MySQL in the ODBC Drivers list to proceed.

For your program, you can use any MySQL database you have on the server, but for this example, use the Northwind database. You've never heard of a MySQL version of the Northwind database, you say? Well, there isn't one. You'll convert the Access Northwind database to MySQL and then you'll use it.

To convert (or, import) the Access Northwind database, you can use a free tool called DBTools Manager. This tool provides many handy functions for MySQL developers. You can download DBTools at

Applied ADO. NET(c) Building Data-Driven Solutions
Applied ADO.NET: Building Data-Driven Solutions
ISBN: 1590590732
EAN: 2147483647
Year: 2006
Pages: 214 © 2008-2017.
If you may any questions please contact us: