Solved

Runing Perl DBD Mysql on Snow Leapord

Posted on 2010-09-03
6
689 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 2

Author Comment

by:nwncody
Comment Utility
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
Comment Utility
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
Comment Utility
Yes I can...
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now