The following describes how to use perl to connect to the MySQL database, including how to correctly install the module.,The following is a description of the MySQL database module on CPAN. I hope you will have a deeper impression on it after reading it.
I used activeperl to learn perl in windows. Today I want to use perl to connect to the MySQL database.
1. Installation Module
First, input ppm in dos. A graphical interface will pop up to list all modules. I want to find the module name that contains MySQL, but I cannot find it. I only see dbi and install it, an error is reported when the test program is running:
- install_driver(MySQL) failed: Can't locate DBD/MySQL.pm in @INC (@INC contains:
- C:/Perl/site/lib C:/Perl/lib .) at (eval 5) line 3.
- Perhaps the DBD::MySQL perl module hasn't been fully installed,
- or perhaps the capitalisation of 'MySQL' isn't right.
- Available drivers: CSV, DBM, ExampleP, File, Gofer, ODBC, Oracle, Proxy, SQLite,
- Sponge.
- at test.pl line 4
2 Google a moment, found the following web page, http://forums.sixapart.com/lofiversion/index.php/t29943.html
If you see an In addition to DBI, you also need DBD: MySQL, enter ppm install "DBD: MySQL" under dos. The installation starts and starts successfully. Run the test program.
To put it bluntly, NND: I think how should I add a MySQL character to the module name, but it is not listed in the graphic interface, causing me to spend a few hours.
In addition, the address of the MySQL module on CPAN:
Http://search.cpan.org /~ Capttofu/DBD-MySQL-4.013/lib/DBD/MySQL. pm
PS: cnblog website classification-> There are python in programming languages, and there is no perl.
The above content is an introduction to perl's connection to the MySQL database. I hope you will find some gains.