Well you did't say what the error was. Try this and at least you should get
an error that tells you something about why connect is failing.
use DBI; my $dsn = 'DBI:mysql:my_database:localhost';
my $db_user_name = 'admin';
my $db_password = 'secret';
my $dbh = DBI->connect($dsn, $db_user_name, $db_password, {RaiseError =>1});
Neil
> -Original Message-
> From: vortex [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 15, 2001 2:30 AM
> To: [EMAIL PROTECTED]
> Subject: dbi connecting prob ->
>
>
> Why will this code not let me connect to a server
>
> use DBI; my $dsn = 'DBI:mysql:my_database:localhost'; my
> $db_user_name = 'admin'; my $db_password = 'secret'; my ($id,
> $password); my $dbh = DBI->connect($dsn, $db_user_name, $db_password);
>
>
> it just gives me an error, it won't let me connect
>
__
Please Note :
Only the intended recipient is authorised to access or use this e-mail. If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately. The contents
of this e-mail are the writer's
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.
We use virus scanning software but exclude all liability for viruses or
similar in any attachment.