Solved

Runing Perl DBD Mysql on Snow Leapord

Posted on 2010-09-03
6
706 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
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…

734 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