jump to navigation

Install DBD::mysql for Mysql 5 on Solaris 10 October 25, 2010

Posted by claudio in Uncategorized.
Tags: , , ,
trackback

Installing DBD::mysql can be a little complicated because the needed libraries and header files are often not installed on Solaris or found in weird places (Howto on installing DBD::mysql with Solaris supplied mysql 4.0.31 and perl 5.8.4). This post explains how to install the module linked with Mysql 5.

To install the module do this:

  1. Install Mysql5. The paths on this post are applicable to the Sun Webstack installation in /opt/webstack. When using an other package or when compiling mysql yourself, change the paths accordingly. Remember that both perl and mysql must coincide in the binary format (32- or 64-bit). Because I use a self compiled 64-bit perl installation, the mysql binaries must be 64-bit as well.
  2. Download the tar ball of the modules or, easier, go to your cpan build directory (set at cpan configure time), typically at ~/.cpan/build/DBD-mysql-<VERSION> (already there if you previously tried to install the module with cpan).
  3. Run the makefile with the following arguments (adapt to your own needs if necessary):
    $ cd ~/.cpan/build/DBD-mysql-<VERSION>
    $ perl Makefile.PL --libs '-R/opt/webstack/mysql/5.0/lib/sparcv9/mysql -L/opt/webstack/mysql/5.0/lib/sparcv9/mysql -lmysqlclient -lz' --cflags '-I/opt/webstack/mysql/5.0/include/mysql -m64' --with-mysql=/opt/webstack/mysql

    (After -lz you can add other options depending on your needs, like -lcrypt for ssl support.)
  4. Complete the normal installation (make, make test (if you have a test db running), make install).

That’s it.

About these ads

Comments»

No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 88 other followers

%d bloggers like this: