472,954 Members | 1,781 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Need help, installing mysql in Perl v5.10.0

I have written a script to connect the mysql db

Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl  -w
  3. use DBI;
  4. #definition of variables
  5. $db="MYTEST";
  6. $host="localhost";
  7. $user="root";
  8. $password="rootpass";
  10. #connect to MySQL database
  11. my $dbh   = DBI->connect ("DBI:mysql:database=$db:host=$host:3366",$user,$password)
  12.                           or die "Can't connect to database: $DBI::errstr\n";
as specified mysql port is 3366 not 3306

but this returns with error,

install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: C:/Perl/site/lib C:/Perl/lib .
) at (eval 4) 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, Proxy, SQLite, Sponge.
at sample.pl line 11

But I already installed DBD::mysql

C:\Documents and Settings\Administrator>ppm install DBD::mysql
Downloading ActiveState Package Repository packlist...not modified
No missing packages to install

C:\Documents and Settings\Administrator>ppm verify DBD::mysql
ppm verify failed: Package 'DBD::mysql' is not installed

C:\Documents and Settings\Administrator>

I'm using perl version, 5.10.0 built for MSWin32-x86-multi-thread

Any help will be appreciated, Thanks in advanced for all your help
Sep 23 '08 #1
11 6078
4,059 Expert 2GB
It appears your install DBD::mysql was not successful. Look in the DBD folder in the perl/lib or perl/site/lib folder and see if it is there.
Sep 23 '08 #2
Thanks for your reply.

Yes, the DBD:mysql is not installed successfully. The mysql.pm is not available either in C:\Perl\lib\DBD or C:\Perl\site\lib\DBD

Through google I find that we have to execute 'ppm install DBD:mysql' in the command prompt to install DBD:mysql. But this is not helpful for me for some reason.

I don't know the way to install DBD:mysql successfully. Is there any alternative way to install the DBD:mysql? Please help me to install DBD:mysql in my v5.10 Perl.

Thanks in Advance for all your help.
Sep 24 '08 #3
4,059 Expert 2GB
Try this:


Once thePPM GUI is running click on the EDIT tab, then PREFERENCES, then click on the REPOSITORIES tab then on the SUGGESTED tab select "uwinnipeg" and click on ADD. After the uwinnipeg packages are viewable see if DBD-mysql is listed. If not try the same thing and add "bribes" to the list of repositories. Once the DBD-mysql module is listed mark it for install then install it. Read the PPM help files if my instructions are confusing.
Sep 24 '08 #4
Finally it is working, ofcourse following your instructions. Lot of thanks KevinADC.

I followed the below

Start -> Run -> PPM , this opens the PPM GUI and

Edit -> Preferences -> Repositories -> Add Repository

First I selected 'uwinnipeg' it was not listed the DBD:mysql then I selected 'bribes' and this too not helped but selecting 'trouchelle' finally listed DBD:mysql which helped me to continue.

After selecting 'trouchelle', I pressed CTRL+1 and found DBD-mysql. Then right click on DBD-mysql and chosen 'Install DBD-mysql XX +'. Went to menu File > Run Marked Actions. Done.

Then I ran the script I mentioned in my first post, it works like a charm.

Again thanks for all your help.

Sep 24 '08 #5
4,059 Expert 2GB
You're welcome
Sep 24 '08 #6
It's very clear,but why I don't have "Add Repository"?and"uwinnipeg","trouchelle'"?

I have the same problem Orz...and I can't solve it.
can you help me? thanks a lot ^^
Dec 6 '08 #7
4,059 Expert 2GB
Can't you click on the "Suggested" box and see a list of repository names?
Dec 6 '08 #8
I can't see any list of of repository names.
I used CPAN(by CMD) and PPM(By CMD and PPM console) to instal DBD::Mysql,but still "ppm verify failed: Package 'DBD::mysql'"
Dec 7 '08 #9
4,059 Expert 2GB
try adding a repository using the PPM GUI:

Dec 7 '08 #10
ha I solve the problem!but now I have another problem
"DBD::mysql" object version 4.005 does not match bootstrap parameter 4.010 at c:/perl/lib/DynalLoader.pm
the above problem I will try to solve it.
Thanks for your help! ^^"
Dec 7 '08 #11
4,059 Expert 2GB
Looks like you need to install a higher version of DBD::mysql
Dec 9 '08 #12

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

Similar topics

by: Angus Comber | last post by:
I have set a password for the mysql root user so when I do this: shell> perl -MCPAN -e shell cpan> install DBI cpan> install DBD::mysql install DBD::mysql fails Is there a way I can run...
by: Sai Hertz And Control Systems | last post by:
Dear all, Their was a huge rore about MySQL recently for something in java functions now theirs one more http://www.mysql.com/doc/en/News-5.0.x.html Does this concern anyone. What I...
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
by: vishalp79 | last post by:
Hi, I am trying to install DBD::Informix module on perl on hpux 11.23 machine. but i get this weird error ...... Set up gcc environment - 4.1.1 *** ExtUtils::AutoInstall version 0.61 ***...
by: mike | last post by:
I help manage a large web site, one that has over 600 html pages... It's a reference site for ham radio folks and as an example, one page indexes over 1.8 gb of on-line PDF documents. The site...
by: jcor | last post by:
Hi, I'm using Ubuntu 7.04. I'm writing a sript that sends files via ftp for several destinations. So far I used Net::FTP and it worked fine. My problem is that I need to send files via SFTP...
by: Megi | last post by:
welcome, I input data form file to mysql with command: load data local infile.. The efect is that the data are duplicated or trippled..etc with every re-loading the script, but I need to load...
by: spatro | last post by:
Hi, I am trying to install DBD::mysql using the CPAN and I am facing the following error: cpan> install DBD::mysql CPAN: Storable loaded ok Going to read /root/.cpan/Metadata Warning:...
by: Scotsman | last post by:
Hi All I have a sticky problem! Its a LEFT JOIN sql statement which works fine in MySQL but not when called in Perl. Any ideas? I have 2 tables: campaigns & companies. I'm trying to join them...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: Mushico | last post by:
How to calculate date of retirement from date of birth
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.