Installing MyODBC on Windows Systems

For Windows systems, you want to use an ODBC driver for connectivity to the MySQL database. Because of this, Windows users need to install one additional program-it is also by the MySQL people and is called MyODBC.

First, you must get the software.

  1. Go to and click "downloads." Then, under "Products," click MyODBC; then click the download link and the latest "stable" release link. Choose the download link that corresponds to your OS, and choose a download site.

  2. Once download is done, unzip the file to a directory so that you can run the setup. Double-click the setup.exe file to begin the installation.

    Figure A-19 shows the first screen for installing the MyODBC drivers.

    click to expand
    Figure A-19: MyODBC Installation screen

  3. Click the Continue button to continue the installation.

    Figure A-20 shows the screen that asks which drivers you want to install; there should only be one-but if there are more choices, choose the MySQL option.

    click to expand
    Figure A-20: MyODBC Installation screen

  4. Click the 'OK' button to continue the installation. Figure A-21 shows the screen for choosing a data source. A data source is used to create a name for the database that you are connecting to and a name for the connection to the database. Choose the sample MySQL option.

    click to expand
    Figure A-21: MyODBC Data Sources screen

  5. Click the Setup button to continue the installation.

    Figure A-22 shows the screen for setting up a data source. For this example, stick with the defaults.

    click to expand
    Figure A-22: MyODBC Data Source Setup screen

  6. Click the OK button to continue the installation.

    Figure A-23 shows the screen that you get when the setup is successful.

    click to expand
    Figure A-23: MyODBC Successful Setup screen

  7. Click the OK button to finish the installation.

    You should now have a data source to connect to. When you are connecting to the database, use this name as the Data Source Name (DSN) name. For example:

    my $dbh =   DBI->connect("DBI::ODBC::datasourcename","user","passwd")   or die...

Perl Database Programming
Perl Database Programming
ISBN: 0764549561
EAN: 2147483647
Year: 2001
Pages: 175 © 2008-2017.
If you may any questions please contact us: