Solved

Runing Perl DBD Mysql on Snow Leapord

Posted on 2010-09-03
6
701 Views
Last Modified: 2012-05-10
I am trying to install DBD/mysql.pm.  There are alot of posts about this here and on the internet.  my question is specifically for OSX Snow Leopard.  I don't want to install MySql server on the OSX machine.  The DB is installed on a Ubuntu system.  I can connect to DB via the MySQL Workbench fine.  But I can't install the DBD/mysql.pm.  All the info on this problem indicates give the credentials to install process.  But this may not be the only server I am going to connect too...can someone tell me what needs to happen here?

0
Comment
Question by:nwncody
  • 3
  • 2
6 Comments
 
LVL 28

Expert Comment

by:FishMonger
ID: 33601503
I don't use Snow Leopard, but could you post the exact error message you get when you try to install the module, as well as the steps you take to do that installation?

Without that info, it will be difficult for anyone to troubleshoot your problem.
0
 
LVL 5

Accepted Solution

by:
group0 earned 500 total points
ID: 33602106
Are you trying to install from CPAN?  Before issuing "install DBD::Mysql", you can set the test options to whatever you need, for example:

o conf makepl_arg "--testdb=test --testuser=root --testpassword=password --testhost=10.11.12.13"

Alternatively, as long as all the build tests are succeeding and it's *just* the DB access test failing, as a last resort you can try:

force install DBD::Mysql

In my own attempt at installing this module with the bundled OSX version, the build wouldn't even complete, and after wasting hours tinkering with it, I ended up installing the community version of ActivePerl (http://www.activestate.com/activeperl/downloads) instead.  It has native pre-compiled commonly used modules and an up-to-date interpreter (OSX only ships with 5.10.0).

If you go this route, you may want to backup the existing /usr/bin/perl, and setup a symlink so that all existing scripts that reference it in the shebang can use the new version instead.  In my case this was:

sudo mv /usr/bin/perl /usr/bin/perl-osx
sudo ln -s /usr/local/ActivePerl-5.10/bin/perl /usr/bin/perl
0
 
LVL 5

Expert Comment

by:group0
ID: 33602111
By the way, the credentials test is only to make sure everything is working properly, it won't have any impact on using other servers or DBs after the module is successfully installed.
0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
LVL 2

Author Comment

by:nwncody
ID: 33611564
I tried what you suggested, while the module would install using the "force" option, perl still did not like it.  So I found an article that talked about install mysql-devel from ports.  So I installed the "sudo port install p5-dbd-mysql".  Now the said that mysql client was installed...see below

Warning: port definitions are more than two weeks old, consider using selfupdate
--->  Computing dependencies for p5-dbd-mysql
--->  Dependencies to be installed: mysql5 p5-dbi p5-test-simple
--->  Fetching mysql5
--->  Attempting to fetch mysql-5.1.49.tar.gz from http://mysql.mirrors.pair.com/Downloads/MySQL-5.1/
--->  Verifying checksum(s) for mysql5
--->  Extracting mysql5
--->  Applying patches to mysql5
--->  Configuring mysql5
--->  Building mysql5
--->  Staging mysql5 into destroot
--->  Installing mysql5 @5.1.49_0
The MySQL client has been installed.
If you also want a MySQL server, install the mysql5-server port.
--->  Activating mysql5 @5.1.49_0
--->  Cleaning mysql5


do you think the mysql server is installed or only the client?

0
 
LVL 5

Expert Comment

by:group0
ID: 33612968
From the ports output, I'd say only the client has been installed.  Are you able to use the Mysql DBD in scripts now?
0
 
LVL 2

Author Comment

by:nwncody
ID: 33613019
Yes I can...
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question