common/tools/lib/DBD/mysql/INSTALL.pod
author Johan Groth <johang@symbian.org>
Tue, 05 Oct 2010 11:37:00 +0100
changeset 1290 7fa08dafc6b9
parent 1174 ead96bc104ea
permissions -rw-r--r--
Added a template to build Orbit tools.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1174
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
     1
=head1 NAME
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
     2
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
     3
INSTALL - How to install and configure DBD::mysql
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
     4
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
     5
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
     6
=head1 SYNOPSIS
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
     7
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
     8
  perl Makefile.PL [options]
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
     9
  make
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    10
  make test
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    11
  make install
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    12
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    13
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    14
=head1 DESCRIPTION
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    15
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    16
This document describes the installation and configuration of
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    17
DBD::mysql, the Perl DBI driver for the MySQL database. Before
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    18
reading on, make sure that you have the prerequisites available:
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    19
Perl, MySQL and DBI. For details see the separate section.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    20
L</PREREQUISITES>.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    21
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    22
Depending on your version of Perl, it might be possible to
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    23
use a binary distribution of DBD::mysql. If possible, this is
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    24
recommended. Otherwise you need to install from the sources.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    25
If so, you will definitely need a C compiler. Installation
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    26
from binaries and sources are both described in separate
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    27
sections. L<BINARY INSTALLATION>. L<SOURCE INSTALLATION>.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    28
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    29
Finally, if you encounter any problems, do not forget to
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    30
read the section on known problems. L<KNOWN PROBLEMS>. If
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    31
that doesn't help, you should look into the archive of the
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    32
mailing list B<perl@lists.mysql.com>. See
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    33
http://www.mysql.com for archive locations. And if that
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    34
still doesn't help, please post a question on this mailing
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    35
list.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    36
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    37
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    38
=head1 PREREQUISITES
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    39
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    40
=over
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    41
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    42
=item Perl
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    43
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    44
Preferrably a version of Perl, that comes preconfigured with
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    45
your system. For example, all Linux and FreeBSD distributions
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    46
come with Perl. For Windows, ActivePerl is recommended, see
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    47
http://www.activestate.com for details.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    48
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    49
=item MySQL
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    50
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    51
You need not install the actual MySQL database server, the
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    52
client files and the devlopment files are sufficient. For
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    53
example, Fedora Core 4 Linux distribution comes with RPM files
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    54
(using YUM) B<mysql.i386> and B<mysql-server.i386> (use "yum search" 
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    55
to find exact package names). These are sufficient, if the MySQL 
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    56
server is located on a foreign machine.  You may also create client
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    57
files by compiling from the MySQL source distribution and using
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    58
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    59
  configure --without-server
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    60
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    61
If you are using Windows and need to compile from sources
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    62
(which is only the case if you are not using ActivePerl),
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    63
then you must ensure that the header and library files are
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    64
installed. This may require choosing a "Custom installation"
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    65
and selecting the appropriate option when running the
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    66
MySQL setup program.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    67
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    68
=item DBI
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    69
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    70
DBD::mysql is a DBI driver, hence you need DBI. It is available
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    71
from the same source where you got the DBD::mysql distribution
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    72
from.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    73
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    74
=item C compiler
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    75
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    76
A C compiler is only required, if you install from source. In
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    77
most cases there are binary distributions of DBD::mysql
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    78
available. However, if you need a C compiler, make sure, that
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    79
it is the same C compiler that was used for compiling Perl and
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    80
MySQL! Otherwise you will almost definitely encounter problems
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    81
because of differences in the underlying C runtime libraries.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    82
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    83
In the worst case, this might mean to compile Perl and MySQL
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    84
yourself. But believe me, experience shows that a lot of problems
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    85
are fixed this way.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    86
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    87
=item Gzip libraries
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    88
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    89
Late versions of MySQL come with support for compression. Thus
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    90
it B<may> be required that you have install an RPM package like
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    91
libz-devel, libgz-devel or something similar.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    92
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    93
=back
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    94
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    95
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    96
=head1 BINARY INSTALLATION
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    97
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    98
Binary installation is possible in the most cases, depending
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
    99
on your system. I give some examples:
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   100
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   101
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   102
=head2 Windows
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   103
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   104
ActivePerl offers a PPM archive of DBD::mysql. All you need to
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   105
do is typing
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   106
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   107
  ppm
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   108
  install DBI
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   109
  install DBD-mysql
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   110
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   111
This will fetch the modules via HTTP and install them. If you
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   112
need to use a WWW proxy server, the environment variable
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   113
HTTP_proxy must be set:
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   114
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   115
  set HTTP_proxy=http://my.proxy.server:8000/
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   116
  ppm
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   117
  install DBI
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   118
  install DBD-mysql
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   119
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   120
Of course you need to replace the host name C<my.proxy.server>
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   121
and the port number C<8000> with your local values.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   122
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   123
If the above procedure doesn't work, please upgrade to the latest
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   124
version of ActivePerl. Versions before build 623 are known to
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   125
have problems.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   126
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   127
PPM 3 is said to miss DBD::mysql in the repository. Thus use of
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   128
PPM 3 is discouraged, in favour of PPM 2. If you need to use
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   129
PPM 3, try
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   130
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   131
  ppm
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   132
  rep add PPM2 http://ppm.activestate.com/PPMPackages/5.6plus/
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   133
  rep 2
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   134
  install DBI
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   135
  install DBD-mysql
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   136
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   137
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   138
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   139
=head2 Red Hat Linux
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   140
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   141
As of version 7.1, Red Hat Linux comes with MySQL and DBD::mysql.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   142
You need to ensure that the following RPM's are installed:
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   143
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   144
  mysql
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   145
  perl-DBI
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   146
  perl-DBD-MySQL
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   147
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   148
For installation from source the following RPM's are required
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   149
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   150
  mysql-devel
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   151
  libz-devel
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   152
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   153
Optional are
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   154
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   155
  mysql-server
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   156
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   157
=head2 Fedora Core Linux
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   158
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   159
As of version 3, Fedora Linux comes with MySQL and DBD::mysql.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   160
You need to ensure that the following RPM's are installed:
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   161
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   162
  mysql or mysql-server
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   163
  perl-DBD-MySQL
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   164
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   165
For installation from source the following RPM's are required
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   166
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   167
  mysql-devel
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   168
  libz-devel
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   169
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   170
Please try 
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   171
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   172
  yum search mysql
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   173
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   174
To see the exact names
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   175
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   176
Note: (important) FC 3 comes with MySQL 3.x, and some people have
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   177
upgraded using MySQL RPMs for newer versions. If you do this, you 
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   178
must re-compile you DBD::mysql because your existing DBD::mysql will be
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   179
linked against the old version of MySQL's client libs. CPAN has no way to
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   180
know or detect that you have upgraded MySQL.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   181
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   182
=head2 Other systems
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   183
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   184
In the case of Linux or FreeBSD distributions it is very likely
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   185
that all you need comes with your distribution, as in the case
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   186
of Red Hat Linux. I just cannot give you names, as I am not using
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   187
these systems.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   188
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   189
Please let me know if you find the files in your SuSE Linux, Debian
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   190
Linux or FreeBSD distribution so that I can extend the above list.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   191
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   192
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   193
=head1 SOURCE INSTALLATION
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   194
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   195
So you need to install from sources. If you are lucky, the Perl
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   196
module C<CPAN> will do all for you, thanks to the excellent work
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   197
of Andreas Koenig. Otherwise you will need to do a manual
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   198
installation. Some of you, in particular system administrators
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   199
of multiple sites, will choose automatic installation. All of
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   200
these installation types have an own section. L</CPAN installation>.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   201
L</Manual installation>. L</Configuration>.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   202
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   203
The DBD::mysql Makefile.PL needs to know where to find your MySQL
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   204
installation. This may be achieved using command line switches
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   205
(see L</Configuration>) or automatically using the mysql_config binary
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   206
which comes with most MySQL distributions. If your MySQL distribution
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   207
contains mysql_config the easiest method is to ensure this binary
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   208
is on your path.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   209
 
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   210
e.g.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   211
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   212
  PATH=$PATH:/usr/local/mysql/bin
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   213
  export PATH
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   214
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   215
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   216
=head2 CPAN installation
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   217
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   218
Installation of DBD::mysql can be incredibly easy:
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   219
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   220
  cpan
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   221
  install DBD::mysql
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   222
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   223
If you are using the CPAN module for the first time, just answer
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   224
the questions by accepting the defaults which are fine in most
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   225
cases. If you are using an older version of Perl, you might
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   226
instead need a
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   227
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   228
  perl -MCPAN -e shell
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   229
  install DBD::mysql
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   230
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   231
If you cannot get the CPAN module working, you might try manual
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   232
installation. If installation with CPAN fails because the your local
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   233
settings have been guessed wrong, you need to ensure MySQL's
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   234
mysql_config is on your path (see L</SOURCE INSTALLATION>) or
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   235
alternatively create a script called C<mysql_config>. This is
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   236
described in more details later. L</Configuration>.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   237
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   238
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   239
=head2 Manual installation
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   240
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   241
For a manual installation you need to fetch the DBD::mysql
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   242
source distribution. The latest version is always available
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   243
from
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   244
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   245
  http://www.cpan.org/modules/by-module/DBD/
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   246
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   247
The name is typically something like
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   248
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   249
  DBD-mysql-1.2216.tar.gz
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   250
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   251
The archive needs to be extracted. On Windows you may use a tool
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   252
like WinZip, on Unix you type
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   253
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   254
  gzip -cd DBD-mysql-1.2216.tar.gz | tar xf -
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   255
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   256
This will create a subdirectory DBD-mysql-1.2216. Enter this
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   257
subdirectory and type
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   258
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   259
  perl Makefile.PL
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   260
  make
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   261
  make test
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   262
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   263
(On Windows you may need to replace "make" with "nmake" or
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   264
"dmake".) If the tests seem to look fine, you may continue with
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   265
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   266
  make install
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   267
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   268
If the compilation (make) or tests fail, you might need to
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   269
configure some settings.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   270
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   271
For example you might choose a different database, the C
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   272
compiler or the linker might need some flags. L</Configuration>.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   273
L</Compiler flags>. L</Linker flags>.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   274
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   275
For Windows/CygWin there is a special section below.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   276
L<Windows/CygWin>.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   277
 
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   278
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   279
=head2 Configuration
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   280
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   281
The install script "Makefile.PL" can be configured via a lot of
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   282
switches. All switches can be used on the command line. For
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   283
example, the test database:
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   284
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   285
  perl Makefile.PL --testdb=<db>
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   286
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   287
If you do not like configuring these switches on the command
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   288
line, you may alternatively create a script called C<mysql_config>.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   289
This is described later on.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   290
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   291
Available switches are:
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   292
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   293
=over
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   294
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   295
=item testdb
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   296
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   297
Name of the test database, defaults to B<test>.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   298
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   299
=item testuser
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   300
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   301
Name of the test user, defaults to empty. If the name is empty,
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   302
then the currently logged in users name will be used.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   303
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   304
=item testpassword
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   305
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   306
Password of the test user, defaults to empty.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   307
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   308
=item testhost
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   309
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   310
Host name or IP number of the test database; defaults to localhost.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   311
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   312
=item testport
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   313
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   314
Port number of the test database
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   315
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   316
=item ps-protcol=1 or 0
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   317
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   318
Whether to run the test suite using server prepared statements or driver
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   319
emulated prepared statemetns. ps-protocol=1 means use server prepare,
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   320
ps-protocol=0 means driver emulated.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   321
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   322
=item cflags
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   323
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   324
This is a list of flags that you want to give to the C compiler.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   325
The most important flag is the location of the MySQL header files.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   326
For example, on Red Hat Linux the header files are in /usr/include/mysql
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   327
and you might try
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   328
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   329
  -I/usr/include/mysql
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   330
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   331
On Windows the header files may be in C:\mysql\include and you might try
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   332
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   333
  -IC:\mysql\include
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   334
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   335
The default flags are determined by running
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   336
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   337
  mysql_config --cflags
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   338
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   339
More details on the C compiler flags can be found in the following
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   340
section. L</Compiler flags>.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   341
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   342
=item libs
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   343
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   344
This is a list of flags that you want to give to the linker
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   345
or loader. The most important flags are the locations and names
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   346
of additional libraries. For example, on Red Hat Linux your
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   347
MySQL client libraries are in /usr/lib/mysql and you might try
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   348
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   349
  -L/usr/lib/mysql -lmysqlclient -lz
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   350
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   351
On Windows the libraries may be in C:\mysql\lib and
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   352
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   353
  -LC:\mysql\lib -lmysqlclient
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   354
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   355
might be a good choice. The default flags are determined by running
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   356
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   357
  mysql_config --libs
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   358
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   359
More details on the linker flags can be found in a separate section.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   360
L<Linker flags>.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   361
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   362
=back
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   363
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   364
If a switch is not present on the command line, then the
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   365
script C<mysql_config> will be executed. This script comes
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   366
as part of the MySQL distribution. For example, to determine
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   367
the C compiler flags, we are executing
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   368
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   369
  mysql_config --cflags
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   370
  mysql_config --libs
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   371
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   372
If you want to configure your own settings for database name,
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   373
database user and so on, then you have to create a script with
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   374
the same name, that replies
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   375
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   376
  
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   377
=head2 Compiler flags
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   378
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   379
Note: the folling info about compiler and linker flags, you shouldn't have
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   380
to use these options because Makefile.PL is pretty good at utilising
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   381
mysql_config to get the flags that you need for a successful compile.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   382
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   383
It is typically not so difficult to determine the appropriate
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   384
flags for the C compiler. The linker flags, which you find in
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   385
the next section, are another story.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   386
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   387
The determination of the C compiler flags is usually left to
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   388
a configuration script called F<mysql_config>, which can be
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   389
invoked with
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   390
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   391
  mysql_config --cflags
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   392
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   393
When doing so, it will emit a line with suggested C compiler
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   394
flags, for example like this:
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   395
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   396
  -L/usr/include/mysql
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   397
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   398
The C compiler must find some header files. Header files have
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   399
the extension C<.h>. MySQL header files are, for example,
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   400
F<mysql.h> and F<mysql_version.h>. In most cases the header
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   401
files are not installed by default. For example, on Windows
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   402
it is an installation option of the MySQL setup program
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   403
(Custom installation), whether the header files are installed
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   404
or not. On Red Hat Linux, you need to install an RPM archive
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   405
F<mysql-devel> or F<MySQL-devel>.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   406
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   407
If you know the location of the header files, then you will
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   408
need to add an option
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   409
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   410
  -L<header directory>
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   411
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   412
to the C compiler flags, for example C<-L/usr/include/mysql>.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   413
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   414
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   415
=head2 Linker flags
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   416
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   417
Appropriate linker flags are the most common source of problems
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   418
while installing DBD::mysql. I will only give a rough overview,
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   419
you'll find more details in the troubleshooting section.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   420
L<KNOWN PROBLEMS>
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   421
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   422
The determination of the C compiler flags is usually left to
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   423
a configuration script called F<mysql_config>, which can be
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   424
invoked with
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   425
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   426
  mysql_config --libs
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   427
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   428
When doing so, it will emit a line with suggested C compiler
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   429
flags, for example like this:
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   430
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   431
   -L'/usr/lib/mysql' -lmysqlclient -lnsl -lm   -lz -lcrypt
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   432
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   433
The following items typically need to be configured for the
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   434
linker:
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   435
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   436
=over
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   437
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   438
=item The mysqlclient library
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   439
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   440
The MySQL client library comes as part of the MySQL distribution.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   441
Depending on your system it may be a file called
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   442
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   443
  F<libmysqlclient.a>   statically linked library, Unix
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   444
  F<libmysqlclient.so>  dynamically linked library, Unix
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   445
  F<mysqlclient.lib>    statically linked library, Windows
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   446
  F<mysqlclient.dll>    dynamically linked library, Windows
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   447
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   448
or something similar.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   449
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   450
As in the case of the header files, the client library is typically
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   451
not installed by default. On Windows you will need to select them
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   452
while running the MySQL setup program (Custom installation). On
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   453
Red Hat Linux an RPM archive F<mysql-devel> or F<MySQL-devel> must
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   454
be installed.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   455
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   456
The linker needs to know the location and name of the mysqlclient
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   457
library. This can be done by adding the flags
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   458
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   459
  -L<lib directory> -lmysqlclient
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   460
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   461
or by adding the complete path name. Examples:
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   462
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   463
  -L/usr/lib/mysql -lmysqlclient
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   464
  -LC:\mysql\lib -lmysqlclient
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   465
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   466
If you would like to use the static libraries (and there are
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   467
excellent reasons to do so), you need to create a separate
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   468
directory, copy the static libraries to that place and use
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   469
the -L switch above to point to your new directory. For example:
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   470
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   471
  mkdir /tmp/mysql-static
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   472
  cp /usr/lib/mysql/*.a /tmp/mysql-static
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   473
  perl Makefile.PL --libs="-L/tmp/mysql-static -lmysqlclient"
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   474
  make
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   475
  make test
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   476
  make install
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   477
  rm -rf /tmp/mysql-static
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   478
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   479
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   480
=item The gzip library
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   481
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   482
The MySQL client can use compression when talking to the MySQL
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   483
server, a nice feature when sending or receiving large texts over
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   484
a slow network.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   485
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   486
On Unix you typically find the appropriate file name by running
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   487
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   488
  ldconfig -p | grep libz
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   489
  ldconfig -p | grep libgz
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   490
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   491
Once you know the name (libz.a or libgz.a is best), just add it
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   492
to the list of linker flags. If this seems to be causing problem
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   493
you may also try to link without gzip libraries.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   494
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   495
=back
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   496
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   497
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   498
=head1 SPECIAL SYSTEMS
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   499
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   500
Below you find information on particular systems:
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   501
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   502
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   503
=head2 Windows/CygWin
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   504
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   505
If you are a user of Cygwin (the Redhat distribution) you already
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   506
know, it contains a nicely running perl 5.6.1, installation of
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   507
additional modules usually works as a charme via the standard
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   508
procedure of
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   509
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   510
    perl makefile.PL
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   511
    make
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   512
    make test
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   513
    make install
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   514
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   515
The Windows binary distribution of MySQL runs smoothly under Cygwin.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   516
You can start/stop the server and use all Windows clients without problem.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   517
But to install DBD::mysql you have to take a little special action.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   518
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   519
Don't attempt to build DBD::mysql against either the MySQL Windows or
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   520
Linux/Unix BINARY distributions: neither will work!
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   521
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   522
You MUST compile the MySQL clients yourself under Cygwin, to get a
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   523
'libmysqlclient.a' compiled under Cygwin. Really! You'll only need
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   524
that library and the header files, you don't need any other client parts.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   525
Continue to use the Windows binaries. And don't attempt (currently) to
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   526
build the MySQL Server part, it is unneccessary, as MySQL AB does an
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   527
excellent job to deliver optimized binaries for the mainstream
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   528
operating systems, and it is told, that the server compiled under Cygwin is
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   529
unstable.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   530
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   531
Install MySQL (if you havn't already)
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   532
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   533
=over
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   534
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   535
=item -
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   536
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   537
download the MySQL Windows Binaries from
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   538
http://www.mysql.com/downloads/index.html
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   539
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   540
=item -
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   541
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   542
unzip mysql-<version>-win.zip into some temporary location
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   543
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   544
=item -
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   545
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   546
start the setup.exe there and follow the instructions
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   547
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   548
=item -
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   549
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   550
start the server
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   551
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   552
=item -
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   553
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   554
alternatively download, install and start the server on a remote
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   555
server, on what supported OS ever
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   556
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   557
=back
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   558
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   559
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   560
Build MySQL clients under Cygwin:
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   561
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   562
=over
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   563
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   564
=item -
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   565
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   566
download the MySQL LINUX source from
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   567
http://www.mysql.com/downloads/index.html
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   568
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   569
=item -
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   570
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   571
unpack mysql-<version>.tar.gz into some tmp location
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   572
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   573
=item -
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   574
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   575
cd into the unpacked dir mysql-<version>
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   576
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   577
  ./configure --prefix=/usr/local/mysql --without-server
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   578
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   579
This prepares the Makefile with the installed Cygwin features. It
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   580
takes some time, but should finish without error. The 'prefix', as
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   581
given, installs the whole Cygwin/MySQL thingy into a location not
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   582
normally in your PATH, so that you continue to use already installed
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   583
Windows binaries. The --without-server parameter tells configure to
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   584
only build the clients.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   585
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   586
=item -
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   587
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   588
  make
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   589
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   590
This builds all MySQL client parts ... be patient. It should finish
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   591
finally without any error.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   592
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   593
=item -
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   594
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   595
  make install
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   596
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   597
This installs the compiled client files under /usr/local/mysql/.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   598
Remember, you don't need anything except the library under
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   599
/usr/local/mysql/lib and the headers under /usr/local/mysql/include!
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   600
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   601
Essentially you are now done with this part. If you want, you may try
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   602
your compiled binaries shortly; for that, do:
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   603
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   604
=item -
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   605
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   606
  cd /usr/local/mysql/bin
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   607
  ./mysql -h 127.0.0.1
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   608
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   609
The host (-h) parameter 127.0.0.1 targets the local host, but forces
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   610
the mysql client to use a TCP/IP connection. The default would be a
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   611
pipe/socket connection (even if you say '-h localhost') and this
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   612
doesn't work between Cygwin and Windows (as far as I know).
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   613
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   614
If you have your MySQL server running on some other box, then please
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   615
substitute '127.0.0.1' with the name or IP-number of that box.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   616
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   617
=back
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   618
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   619
Please note, in my environment the 'mysql' client did not accept a
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   620
simple RETURN, I had to use CTRL-RETURN to send commands
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   621
... strange,
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   622
but I didn't attempt to fix that, as we are only interested in the
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   623
built lib and headers.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   624
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   625
At the 'mysql>' prompt do a quick check:
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   626
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   627
  mysql> use mysql
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   628
  mysql> show tables;
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   629
  mysql> select * from db;
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   630
  mysql> exit
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   631
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   632
You are now ready to build DBD::mysql!
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   633
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   634
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   635
Build DBD::mysql:
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   636
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   637
=over
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   638
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   639
=item -
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   640
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   641
download DBD-mysql-<version>.tar.gz from CPAN
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   642
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   643
=item -
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   644
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   645
unpack DBD-mysql-<version>.tar.gz
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   646
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   647
=item -
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   648
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   649
cd into unpacked dir DBD-mysql-<version>
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   650
you probably did that already, if you are reading this!
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   651
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   652
=item -
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   653
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   654
  cp /usr/local/mysql/bin/mysql_config .
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   655
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   656
This copies the executable script mentioned in the DBD::mysql docs
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   657
from your just built Cywin/MySQL client directory; it knows about
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   658
your Cygwin installation, especially about the right libraries to link
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   659
with.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   660
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   661
=item -
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   662
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   663
  perl Makefile.PL --testhost=127.0.0.1
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   664
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   665
The --testhost=127.0.0.1 parameter again forces a TCP/IP connection
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   666
to the MySQL server on the local host instead of a pipe/socket
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   667
connection for the 'make test' phase.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   668
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   669
=item -
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   670
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   671
  make
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   672
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   673
This should run without error
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   674
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   675
=item -
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   676
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   677
  make test
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   678
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   679
with DBD-mysql-2.1022 or earlier you will see several errors in
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   680
dbdadmin.t, mysql.t and mysql2.t; with later versions you should not
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   681
get errors (except possibly one, indicating, that some tables could
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   682
not be dropped. I'm hunting for a solution to that problem, but have
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   683
none yet).
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   684
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   685
=item -
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   686
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   687
  make install
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   688
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   689
This installs DBD::mysql into the Perl hierarchy.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   690
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   691
=back
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   692
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   693
Notes:
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   694
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   695
This was tested with MySQL version 3.23.54a and DBD::mysql version
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   696
2.1022. I patched the above mentioned test scripts and sent the
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   697
patches
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   698
to the author of DBD::mysql Jochen Wiedman.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   699
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   700
Georg Rehfeld          15. Jan. 2003
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   701
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   702
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   703
=head1 KNOWN PROBLEMS
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   704
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   705
=over
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   706
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   707
=item 1.)
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   708
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   709
Some Linux distributions don't come with a gzip library by default.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   710
Running "make" terminates with an error message like
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   711
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   712
  LD_RUN_PATH="/usr/lib/mysql:/lib:/usr/lib" gcc
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   713
    -o blib/arch/auto/DBD/mysql/mysql.so  -shared
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   714
    -L/usr/local/lib dbdimp.o mysql.o -L/usr/lib/mysql
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   715
    -lmysqlclient -lm -L/usr/lib/gcc-lib/i386-redhat-linux/2.96
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   716
    -lgcc -lz 
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   717
  /usr/bin/ld: cannot find -lz
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   718
  collect2: ld returned 1 exit status
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   719
  make: *** [blib/arch/auto/DBD/mysql/mysql.so] Error 1
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   720
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   721
If this is the case for you, install an RPM archive like
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   722
libz-devel, libgz-devel, zlib-devel or gzlib-devel or something
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   723
similar.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   724
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   725
=item 2.)
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   726
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   727
If Perl was compiled with gcc or egcs, but MySQL was compiled
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   728
with another compiler or on another system, an error message like
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   729
this is very likely when running "Make test":
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   730
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   731
  t/00base............install_driver(mysql) failed: Can't load
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   732
  '../blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql:
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   733
  ../blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: _umoddi3
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   734
  at /usr/local/perl-5.005/lib/5.005/i586-linux-thread/DynaLoader.pm
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   735
  line 168.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   736
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   737
This means, that your linker doesn't include libgcc.a. You have
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   738
the following options:
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   739
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   740
The solution is telling the linker to use libgcc. Run
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   741
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   742
  gcc --print-libgcc-file
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   743
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   744
to determine the exact location of libgcc.a or for older versions
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   745
of gcc
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   746
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   747
  gcc -v
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   748
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   749
to determine the directory. If you know the directory, add a
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   750
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   751
  -L<directory> -lgcc
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   752
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   753
to the list of C compiler flags. L</Configuration>. L</Linker flags>.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   754
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   755
=item 3.)
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   756
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   757
There are known problems with shared versions of libmysqlclient,
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   758
at least on some Linux boxes. If you receive an error message
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   759
similar to
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   760
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   761
  install_driver(mysql) failed: Can't load
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   762
  '/usr/lib/perl5/site_perl/i586-linux/auto/DBD/mysql/mysql.so'
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   763
  for module DBD::mysql: File not found at
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   764
  /usr/lib/perl5/i586-linux/5.00404/DynaLoader.pm line 166
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   765
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   766
then this error message can be misleading: It's not mysql.so
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   767
that fails being loaded, but libmysqlclient.so! The usual
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   768
problem is that this file is located in a directory like
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   769
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   770
  /usr/lib/mysql
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   771
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   772
where the linker doesn't look for it.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   773
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   774
The best workaround is using a statically linked mysqlclient
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   775
library, for example
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   776
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   777
  /usr/lib/mysql/libmysqlclient.a
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   778
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   779
The use of a statically linked library is described in the
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   780
previous section on linker flags. L</Configuration>.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   781
L</Linker flags>.  
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   782
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   783
=item 4.)
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   784
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   785
Red Hat 8 & 9 set the Default locale to UTF which causes problems with 
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   786
MakeMaker.  To build DBD::mysql on these systems, do a 'unset LANG' 
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   787
before runing 'perl Makefile.PL'
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   788
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   789
=back
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   790
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   791
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   792
=head1 SUPPORT
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   793
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   794
Finally, if everything else fails, you are not alone. First of
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   795
all, for an immediate answer, you should look into the archives
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   796
of the mailing list B<perl@lists.mysql.com>. See
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   797
http://www.mysql.com for archive locations.
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   798
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   799
If you don't find an appropriate posting and reply in the
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   800
mailing list, please post a question. Typically a reply will
ead96bc104ea Add DBD-mysql module (needed by bitops.pl)
Dario Sestito <darios@symbian.org>
parents:
diff changeset
   801
be seen within one or two days.