Yes, it was kind of telling me where to look - trying to do too many things at once.
The original problem as the log pointed out was that I did not have a path to the MySQL bin folder.
Fixed that... but the install still failed... but because I used the --force it installed anyway - last few lines of the log as follows:
Non-zero exit status: 38
Parse errors: Bad plan. You planned 60 tests but ran 0.
t/zvg_43prof_env.t (Wstat: 9728 Tests: 11 Failed: 0)
Non-zero exit status: 38
Files=182, Tests=7257, 137 wallclock secs ( 1.59 usr + 0.81 sys = 2.
+40 CPU)
Result: FAIL
Failed 10/182 test programs. 0/7257 subtests failed.
dmake.exe: Error code 255, while making 'test_dynamic'
-> FAIL Testing DBI-1.633 failed but installing it anyway.
Files found in blib\arch: installing files in blib\lib into architectu
+re dependent library tree
Installing C:\Perl64\site\lib\auto\DBI\DBI.dll
Appending installation info to C:\Perl64\lib/perllocal.pod
dmake.exe: Warning: -- Target [install] was made but the time stamp h
+as not been updated.
-> OK
Successfully reinstalled DBI-1.633
1 distribution installed
If I try and install without the --force I get a message saying the module is up-to-date.
perldoc DBI also returns information however my test connect to the database (test Perl program) is returning the following error still:
install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC
+contains: C:/Perl64/site/lib/MSWin32-x64-multi-thread C:/Perl64/site/
+lib C:/Perl64/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, Pg,
+Proxy, SQLite, Sponge.
at C:\BATHGATE_WEATHER_OBSERVATION_SYSTEM\PERL\TEST_SQL.pl line 12.
Code for the test Perl program is...
#! c:\xampp\perl\bin\perl
use strict;
use warnings;
use DBI;
my $dsn = "DBI:mysql:weather";
my $db_user = "colin";
my $db_pass = "???????????";
my $dbh = DBI->connect ($dsn,$db_user,$db_pass)
or die "Couldn't connect to MySQL.\n";
print "Connection Successful: \$dbh=$dbh\n";
my $sql = "select station_id, station_name
from stations";
my $sth = $dbh->prepare($sql)
or die "Couldn't prepare statement $sql.\n";
$sth->execute()
or die "Couldn't execute statement $sql.\n";
$sth->finish;
$dbh->disconnect;
exit;
This appears to suggest that DBD:mysql is not installed, tried to install this module but it also failed with the following ending to the log file:
C:\Users\Colin\.cpanm\work\1424205331.7856\DBD-mysql-4.029/mysql.xs:68
+: undefined reference to `mysql_error'
C:\Users\Colin\.cpanm\work\1424205331.7856\DBD-mysql-4.029/mysql.xs:68
+: undefined reference to `mysql_errno'
collect2: ld returned 1 exit status
dmake.exe: Error code 129, while making 'blib\arch\auto\DBD\mysql\mys
+ql.dll'
-> FAIL Installing DBD::mysql failed. See C:\Users\Colin\.cpanm\work\1
+424205331.7856\build.log for details. Retry with --force to force ins
+tall it.
This module will not install with -force and does not show up anything when I enter perldocs DBD::MySQL
Not sure what to do next, do I need both modules, DBI and DBD::MySQL? I can provide full log data if required...
Thanks for any help on this... Colin |