Installing ActiveState Perl on Windows
190
shell>
perl Makefile.PL
shell>
make
shell>
make test
shell>
make install
The
make test
command is important because it verifies that the module is working. Note that when
you run that command during the
DBD::mysql
installation to exercise the interface code, the MySQL
server must be running or the test fails.
It is a good idea to rebuild and reinstall the
DBD::mysql
distribution whenever you install a new
release of MySQL. This ensures that the latest versions of the MySQL client libraries are installed
correctly.
If you do not have access rights to install Perl modules in the system directory or if you want to install
local Perl modules, the following reference may be useful:
http://servers.digitaldaze.com/extensions/
perl/modules.html#modules
Look under the heading “Installing New Modules that Require Locally Installed Modules.”
2.22.2. Installing ActiveState Perl on Windows
On Windows, you should do the following to install the MySQL
DBD
module with ActiveState Perl:
1. Get ActiveState Perl from
http://www.activestate.com/Products/ActivePerl/
and install it.
2. Open a console window.
3. If necessary, set the
HTTP_proxy
variable. For example, you might try a setting like this:
C:\>
set HTTP_proxy=my.proxy.com:3128
4. Start the PPM program:
C:\>
C:\perl\bin\ppm.pl
5. If you have not previously done so, install
DBI
:
ppm>
install DBI
6. If this succeeds, run the following command:
ppm>
install DBD-mysql
This procedure should work with ActiveState Perl 5.6 or newer.
If you cannot get the procedure to work, you should install the ODBC driver instead and connect to the
MySQL server through ODBC:
use DBI;
$dbh= DBI->connect("DBI:ODBC:$dsn",$user,$password) ||
die "Got error $DBI::errstr when connecting to $dsn\n";
2.22.3. Problems Using the Perl
DBI
/
DBD
Interface
If Perl reports that it cannot find the
../mysql/mysql.so
module, the problem is probably that Perl
cannot locate the
libmysqlclient.so
shared library. You should be able to fix this problem by one
of the following methods:
• Compile the
DBD::mysql
distribution with
perl Makefile.PL -static -config
rather than
perl Makefile.PL
.
• Copy
libmysqlclient.so
to the directory where your other shared libraries are located (probably
/usr/lib
or
/lib
).
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...