Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

use dbi problems

davidrtgdavidrtg Member Posts: 95
[b][red]This message was edited by davidrtg at 2004-1-9 8:12:38[/red][/b][hr]
Not sure if this is the place to ask or not but here it goes.

I'm moving a site onto a stand alone system running windows. I have installed MySQL and Perl and both are running. I get the following error with the following lines of code.

ERROR:
[code]
install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .) at (eval 1)
Perhaps the DBD::mysql perl module hasn't been fully installed, or perhaps the capitalisation of 'mysql' isn't right.
at C:Inetpubwwwrootcgi-bin
andom.pl line 8
[/code]
CODE:
[code]
#!c:Perlinperl.exe

use DBI;

$dsn = 'DBI:mysql:database:localhost';
$user = 'user';
$password = 'password';
$dbh = DBI->connect($dsn, $db_user_name, $db_password);
[/code]

MySQL.pm is found in C:PerlsitelibNet

I'm lost hehe..

EDIT: got it working, had to run a install again of DBI and DBD::mysql.

Comments

  • JonathanJonathan Member Posts: 2,914
    [b][red]This message was edited by Moderator at 2004-1-9 9:13:46[/red][/b][hr]
    : [b][red]This message was edited by davidrtg at 2004-1-9 8:12:38[/red][/b][hr]
    : Not sure if this is the place to ask or not but here it goes.
    It's a Perl problem, not a MySQL one, so Perl board would probably have been better. But no worries.

    : I'm moving a site onto a stand alone system running windows. I have installed MySQL and Perl and both are running. I get the following error with the following lines of code.
    :
    : ERROR:
    : [code]
    : install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .) at (eval 1)
    : Perhaps the DBD::mysql perl module hasn't been fully installed, or perhaps the capitalisation of 'mysql' isn't right.
    : at C:Inetpubwwwrootcgi-bin
    andom.pl line 8
    : [/code]
    : CODE:
    : [code]
    : #!c:Perlinperl.exe
    :
    : use DBI;
    :
    : $dsn = 'DBI:mysql:database:localhost';
    : $user = 'user';
    : $password = 'password';
    : $dbh = DBI->connect($dsn, $db_user_name, $db_password);
    : [/code]
    :
    : MySQL.pm is found in C:PerlsitelibNet
    :
    : I'm lost hehe..
    :
    : EDIT: got it working, had to run a install again of DBI and DBD::mysql.
    :
    Yup, you got it. :-) For future reference, there is a page about this in the CodePedia:-
    http://www.codepedia.com/1/PerlDBITutorial

    Jonathan

    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");



Sign In or Register to comment.