473,385 Members | 1,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Having problem on DBD::mysql

Hi,

I have a problem on connect to MYSQL database.
Below is my code:

Expand|Select|Wrap|Line Numbers
  1. use strict;
  2. use warnings;
  3. use DBI;
  4. my $dbh = DBI->connect('DBI:mysql:MYDB', 'andres', '123'
  5.                ) || die "Could not connect to database: $DBI::errstr";
  6.  
  7. $dbh->disconnect();
When i execute my perl file, it show out:

install_driver(mysql) failed: Can't locate loadable object for module DBD::mysql in @INC (@INC contains: C:/Perl/site/lib C:/Perl/lib .) at (eval 5) line 3
Compilation failed in require at (eval 5) line 3.
Perhaps a module that DBD::mysql requires hasn't been fully installed at insertdata.pl line 6

I have put the DBD library in c:\Perl\lib\DBD and c:\perl\site\lib\DBD , but i the problem still persist.

The weird things that i found out whenever i run then "ppm install DBD::mysql" but it always time out.

Any one can help me on this? Thanks in advance.,,
Apr 30 '12 #1
2 2777
numberwhun
3,509 Expert Mod 2GB
What is funny is DBD::mysql is usually installed with Perl by default. What version of Perl are you using? I am assuming Active State since you mentioned ppm.

Have you tried using Strawberry Perl if your on Windows?

Regards,

Jeff
May 1 '12 #2
RonB
589 Expert Mod 512MB
This error:
install_driver(mysql) failed: Can't locate loadable object for module DBD::mysql
Along with this:
I have put the DBD library in c:\Perl\lib\DBD and c:\perl\site\lib\DBD
tells me that you didn't install the module correctly.

What error message do you get when you try to install it via ppm?
May 1 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Randell D. | last post by:
Folks, I have installed MySQL v4 (client, server and development rpm's). I've tried and failed to use the recommended mysqladmin to set a root password after the installation (I have another post...
1
by: Kerry Shetline | last post by:
I've successfully installed MySQL and the Perl DBI module, but when I try to install DBD::mysql, it keeps failing like this: -------------------- (from the CPAN shell) --------------------- .......
0
by: JL | last post by:
Platform: Linux Red Hat RHEL 3 (and red hat 9) Installed MySQL from source. As a matter of fact, installed all LAMPS from source, and the mysql socket file was arranged in a place other than...
0
by: Madhu Nair | last post by:
I am getting errors while compiling DBD-mysql 2.9002 on HP-UX 11.00 I have perl 5.8 downloaded from HP depot installed at /opt/perl Mysql 4.0.13 compiled myself with gcc with Mysql recommended...
0
by: Yun Guan | last post by:
Hello mysql gurus, I am trying to run perl on mysql database on Red Hat box. I want to install DBI and DBD:mysql using CPAN: perl -MCPAN -e shell cpan>install DBI The above succeeded, but...
0
by: Paul | last post by:
I'm having problems in getting the tests associated with DBD::mysql. When they are executed, I get the following error repeated many times: t/00base...........install_driver(mysql) failed: Can't...
1
by: Alex Hunsley | last post by:
I am trying to install the DBD::mysql perl module. However, it claims I need mysql.h: cpan> install DBD::mysql CPAN: Storable loaded ok Going to read /home/alex/.cpan/Metadata Database was...
0
by: pvannie | last post by:
Hello there, I've been trying to install DBD::mysql on Mac OS X Server 10.3 for 2 days, but it still raises error. So I'm going to send this message to ask for help. Any help will be much...
1
by: pvannie | last post by:
Hello there, I've been trying to install DBD::mysql on Mac OS X Server 10.3 for 2 days, but it still raises error. So I'm going to send this message to ask for help. Any help will be much...
3
by: menzies | last post by:
Hi, I"m new to this forum, but I have been trying all day to install DBD::mysql onto my Intel MacBook. I've read lots of forums pages and none have gotten me to a successful 'make test' or a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.