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.
Go to http://www.mysql.com 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.
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.
Figure A-19: MyODBC Installation screen
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.
Figure A-20: MyODBC Installation screen
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.
Figure A-21: MyODBC Data Sources screen
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.
Figure A-22: MyODBC Data Source Setup screen
Click the OK button to continue the installation.
Figure A-23 shows the screen that you get when the setup is successful.
Figure A-23: MyODBC Successful Setup screen
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...