LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 10-13-2013, 01:09 PM   #1
zak100
Member
 
Registered: Jul 2009
Posts: 139

Rep: Reputation: 2
Problem with connecting Perl with mysql


Hi,
I am trying to connect mysql with Perl. I am using windows 7 but i found that same problem occurs on some linux plat forms also. I got following message while connecting with mysql database:
Code:
D:\Zulfi\PERL MAIN FOLDER>perl CTdb.pl
install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains:
C:/Perl64/site/lib C:/Perl64/lib .) at (eval 3) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: CSV, DBM, ExampleP, File, Gofer, ODBC, Oracle, Pg, Proxy, SQL
ite, Sponge.
 at CTdb.pl line 4.
I got one solution from the following site:
http://www.cpanelkb.net/how-to-install-perl-dbd-mysql/
which says:
Quote:
How to Install Perl DBD::MySQL, Use the following manual installation.

Below is the step,

Run from Shell.

perl -MCPAN -e shell

Type in,

cpan> install DBD::mysql

Wait for the installation.

Thats all!!
However when i executed "perl -MCPAN -e shell" command, i got following problem of locking:
Code:
C:\Users\HP>perl -MCPAN -e shell

It looks like you don't have a C compiler and make utility installed.  Trying
to install dmake and the MinGW64 gcc compiler using the Perl Package Manager.
This may take a a few minutes...

Downloading MinGW64-4.5.4...done
Downloading dmake-4.12.20090907...done
Unpacking MinGW64-4.5.4...done
Unpacking dmake-4.12.20090907...done
Generating HTML for MinGW64-4.5.4...done
Generating HTML for dmake-4.12.20090907...done
Updating files in site area...done
4601 files installed

Please use the `dmake` program to run commands from a Makefile!

Set up gcc environment - gcc.exe (rubenvb-4.5.4) 4.5.4
CPAN.pm panic: Found invalid lockfile 'C:\Perl64\cpan\.lock', please remove. Can
not proceed.


C:\Users\HP>
Can somebody plz guide me? The download takes lot of time and internet connections are not so stable. Plz help me.

Zulfi.

Last edited by zak100; 10-13-2013 at 01:11 PM.
 
Old 10-13-2013, 01:18 PM   #2
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 85
Well, one obvious issue is this line:

'CPAN.pm panic: Found invalid lockfile 'C:\Perl64\cpan\.lock', please remove.'

You could move this file out of the cpan directory, and try the install again.

If this doesn't work, it might be worth trying a Windows forum, for example theeldergeek.com.

On Linux, it might be better to install the versions of gcc and make supplied from your distro's repositories before trying the DBD install again.

Last edited by Robhogg; 10-13-2013 at 01:26 PM.
 
Old 10-13-2013, 01:45 PM   #3
zak100
Member
 
Registered: Jul 2009
Posts: 139

Original Poster
Rep: Reputation: 2
Hi,
Thanks for your response. I got the solution:
Code:
C:\Users\HP>ppm install DBD::mysql
Downloading DBD-mysql-4.022...done
Unpacking DBD-mysql-4.022...done
Generating HTML for DBD-mysql-4.022...done
Updating files in site area...done
  12 files installed
Zulfi.
 
  


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] connecting mysql using perl zak100 Linux - Newbie 7 09-28-2013 10:25 AM
Installing Perl (v5.8.8) module for connecting to MySQL Abhinav Kakkar Red Hat 1 08-02-2010 09:27 AM
Bugzilla - MySQL - perl - DBD::mysql install problem amchargue Linux - Software 3 09-10-2008 12:01 AM
Bugzilla - MySQL - perl - DBD::mysql install problem Runningonair Linux - Software 8 10-12-2007 12:42 AM
problem in connecting mysql ansishere General 1 11-14-2005 04:42 AM


All times are GMT -5. The time now is 01:50 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration