在windows下的Activeperl中使用DBI模块连接mysql数据库时,被报错,提示DBD::mysql perl module hasn’t been fully installed

需要进行安装。以下是错误信息。

install_driver(mysql) failed: Can't locate loadable object for module
+DBD::mysql in @INC (@INC contains: C:/Perl/site/lib C:/Perl/lib .) at
+ (eval 4) line 3
Compilation failed in require at (eval 4) line 3.
Perhaps a module that DBD::mysql requires hasn't been fully installed

进行安装也很简单,在DOS命令行下,进入perl的安装目录,分别运行

ppm remove DBD::mysql

ppm install DBD::mysql

即可。