PHP HelpPHP Help

Online Community that helps beginners learn PHP,
and webmasters solve PHP coding problems

since 1999

Using MyODBC to Connect to a Remote Database

Getting Started With MyODBC

Downloading MyODBC

The MyODBC download package is available at the MySQL site in the Downloads section. Scroll down to the MySQL Related Software and choose Downloads for MyODBC. (On the main site, MyODBC links are available from

Tip:  for a faster download, try one of the MySQL mirror sites. Choose the mirror that is closest to you (

MyODBC is available for the Windows 9x and NT platforms as well as various flavors of Unix (including Linux). The source code for MyODBC is included in the distribution. If you only want to use the MyODBC application, you can safely ignore the various makefiles and C code included with it in the download package. Just install the MyODBC executable program (it's easy, see below).

Caution:  MyODBC is distributed in separate versions for Windows 9x and NT because of a bug in Microsoft ODBC setup that prevents it from detecting the operating system. The current version of MyODBC is 2.5. The latest version of the MyODBC download package for Windows 9x available at Make sure you are using the latest version containing all the updates and fixes. MyODBC archive is about 1.5K and downloads in a few mintues at 56k.

Installing MyDOBC

Once you've download MyODBC into a convenient directory on your hard disk, you can open the archive and decompress the files inside. I suggest using WinZip or other application that makes the job of extracting files easy.

You can start WinZip by double-clicking on the file in the Windows Explorer. I keep mine set to the classic version, which makes the Install button readily available. This is a cool feature that will automatically create a temporary directory, unzip the archive, extract the files and start installation by running setup.exe if it finds one. Here's what the screen looks like just before installation.

Installing MyODBC

Don't forget to tell WinZip that the installation is complete so it can close its window and clean up the files.

When you start the installation process, the first window you see will be the Microsoft ODBC Setup dialog. Click Continue.

Microsoft ODBC Setup

At this point, the Install Drivers dialog window should appear. (If you do not reach this point in the installation, something is wrong with the way Windows is setup. Please contact Microsoft support to help resolve this issue.) Select MyODBC and click OK (or just click OK).

Install ODBC Driver for MySQL

If have trouble installing the driver or are merely curious, you will find version related installation options by clicking on the Advanced button. This button brings up the Advanced Installation Options dialog window.

ODBC Advanced Installation Options

Further information about the driver version is available in the Versions dialog, by clicking on the Versions button in the Advanced Installation Options dialog.

ODBC driver version

If the MyODBC driver was successfully installed, the next dialog you see will be the Data Sources dialog. This dialog is part of the Microsoft ODBC system and not a part of MyODBC. You should see the sample data source installed by MyODBC, called sample-MySQL (MySQL) in the data sources driver window. Although you could select the MySQL entry and push the Setup button to bring up the MyODBC setup panel, we will be configuring the remote connection from within MS Access. That is so we can create a data source tailored to our project.

ODBC Data Sources

When you're done, you should see a message telling you that the new ODBC driver has been successfully installed. Click OK.

ODBC driver

Pages:  1   2   3   4   5Next:  Connecting to An Established Remote Database »

Copyright © 2017