LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-15-2002, 03:13 AM   #1
jolly_good2000
LQ Newbie
 
Registered: Nov 2002
Distribution: SuSE Linux 8.1 Professional
Posts: 23

Rep: Reputation: 15
can't install DBD::mysql on suse linux 8.1


I can't install DBD::mysql on suse linux 8.1

I got my instructions here:
http://www.perl.com/CPAN/
http://search.cpan.org/author/TIMB/D.../Bundle/DBI.pm
http://search.cpan.org/author/JWIED/...e/DBD/mysql.pm

to do this
perl -MCPAN -e 'install Bundle:BI'
perl -MCPAN -e 'install Bundle:BD::mysql'

the DBI install worked.
I got the following error when doing the DBD::mysql install


perl Makefile.PL --help
Running make test
Make had some problems, maybe interrupted? Won't test
Running make install
Make had some problems, maybe interrupted? Won't install
Running install for module DBD::mysql
Running make for J/JW/JWIED/DBD-mysql-2.1020.tar.gz
Is already unwrapped into directory /root/.cpan/build/DBD-mysql-2.1020
Makefile.PL returned status 512
Running make test
Make had some problems, maybe interrupted? Won't test
Running make install
Make had some problems, maybe interrupted? Won't install
Bundle summary: The following items in bundle Bundle:BD::mysql had
installation problems:
Mysql DBD::mysql


cheers
Scott
 
Old 11-15-2002, 03:31 AM   #2
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
As you've got DBI installed try downloading http://www.cpan.org/authors/id/J/JW/...-1.2219.tar.gz then follow the usual install processes (untar, perl Makefile.pl, make, make test, make install) and see if that works. I've never had any problems with installing modules this way apart from the odd missing dependency.

cheers

Jamie...
 
Old 11-15-2002, 02:53 PM   #3
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
i never had any problems yet either.
was the mysql-server running when u installed the driver?
cheers, jens
btw.. i guess it's part of your distro, take a look at yast
(named perl-msql-mysql-modules)

Last edited by j-ray; 11-15-2002 at 02:59 PM.
 
Old 11-16-2002, 11:25 PM   #4
jolly_good2000
LQ Newbie
 
Registered: Nov 2002
Distribution: SuSE Linux 8.1 Professional
Posts: 23

Original Poster
Rep: Reputation: 15
DBI::mysql still does not work

DBI::mysql still does not work

I tried 2 things

1.
used YaST to install perl-msql-mysql-modules and my perl script failed.

2.
perl -MCPAN -e 'install Bundle:BI'
perl -MCPAN -e 'install Bundle:BB::mysql' had a warning probably because it was already installed by yast.

this is my scrip and the error

#!/usr/bin/perl

use DBI;

$name = "scott";
print "hi $name \n";

my $dbh = DBI->connect("DBI:mysql:test","someuser","somepassword");

DBI->connect(test) failed: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2) at ./test.pl line 8


-safe_mysqld was running
-I added /usr/local/mysql/bin to my path with
export PATH=$PATH:/usr/local/mysql/bin
but when I type "which mysql" it is not in the path.

cheers
scott
 
Old 11-17-2002, 04:52 PM   #5
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
1. u don't need mysql/bin inthe $PATH

my $dsn = 'DBI:mysql:test:localhost';
$dbh = DBI->connect ($dsn, $db_user_name, $db_password, {RaiseError => 1 });

that's the way i connect, so maybe u have to add the host.
or maybe u get a more detailed error message.
try 'ps -e'
to see whether there is more than 1 mysql process running
mysql.sock(2) ! should be only one
can u communicate with the mysql normally?
cheers, jens

take a look at mysql error log - might be in mysql/data/host.err

Last edited by j-ray; 11-17-2002 at 04:59 PM.
 
Old 11-17-2002, 05:25 PM   #6
jolly_good2000
LQ Newbie
 
Registered: Nov 2002
Distribution: SuSE Linux 8.1 Professional
Posts: 23

Original Poster
Rep: Reputation: 15
problem is solved

Thanks everyone for your input.

I solved it by adding
mysql_socket=/tmp/mysql.sock
to the connect script

DBI->connect("dbi:mysql:test;mysql_socket=/tmp/mysql.sock", $someruser,$somepassword);

cheers
Scott
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bugzilla - MySQL - perl - DBD::mysql install problem Runningonair Linux - Software 8 10-12-2007 01:42 AM
DBD::MySQL + MySQL install problems. Elleroth Linux - Software 4 03-24-2006 07:53 AM
Error compiling perl-DBD-MySQL after upgrading to MySQL 4.1 pitaro920 Linux - Software 1 01-16-2006 05:28 PM
DBD-MySql-2.9004 Installation problem on Linux RedHat 9 luth Linux - Software 4 11-30-2004 05:56 AM
Can't install DBD::mysql or DBD::Pg DogTags Mandriva 2 01-21-2004 08:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration