Solved

Runing Perl DBD Mysql on Snow Leapord

Posted on 2010-09-03
6
699 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

785 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