Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

MySQL and Perl

I'm trying to add 2 modules to MySQl using Perl. Instructions say to use
perl -MCPAN -e 'install DBI' and perl -MCPAN -e 'install DBD::mysql'.

I'm using an XServe G5 running 10.4.2. When executing the first command I get the following result

Writing Makefile for DBI
-- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible

I also ran a mysql -v and received the following

insidedns2:/etc root# mysql -v
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)
insidedns2:/etc root#

Are they related, and does someone know the workaround.

Thanks

Posted on Oct 13, 2005 6:37 AM

Reply
2 replies

Jan 4, 2006 2:28 PM in response to Bart Kunz1

This is exactly the same problem that I encountered when attempting to install perl modules on my laptop.

First: CPAN should have downloaded the files for the module somewhere. Find where these files are. It should just be in a directory called DBI (if this is the module that you are installing).

Move into this directory and type "make install" or even "sudo make install". This should install the module for you.

As far as your second problem I doubt it is related to your perl problem. Although DBI interacts with mysql, it is a part of perl. I always use mysqld_safe to start my mysql server, but this is on my laptop.

Jan 4, 2006 8:33 PM in response to Bart Kunz1

Hi Bart,
Also, to install the Perl DBI module, you'll need to have your MySQL server up and running first. I'd also recommend installing the DBI module first, then the DBD module. When you type perl Makefile , make note of any missing dependencies and resolve them first before moving on and running make , make test , and make install .

As for the second error message, it's indicating that the permissions on the MySQL socket file are probably not correct. I'd go thru the MySQL README post-installation check list and ensure everything checks out and that you can bring up the server ok. Then install the DBI and DBD perl modules.


Ed

MySQL and Perl

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.