Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Cant connect to mysql database !

3 views
Skip to first unread message

M. Allan Noah

unread,
Jan 20, 2010, 11:27:24 AM1/20/10
to Pooja Sohni, dbi-...@perl.org
I think you mean DBI->connect(, not DBI::connect->(

allan

On Wed, Jan 20, 2010 at 5:56 AM, Pooja Sohni <pso...@google.com> wrote:
> Can't connect to data source '' because I can't work out what driver
> to use (it
> doesn't seem to contain a 'dbi:driver:' prefix and the DBI_DRIVER env
> var is not
>  set) at reportdw.pl line 463
>
> Below is my db connection string format :
>
> use DBI;
> my $mysqlDbh = DBI::connect->
> ("dbi:mysql:dbname:hostname","username","password") or die
> ($DBI::errstr);
>
> Can anyone help me on this.
>
> Thanks
> Pooja
>
>

--
"The truth is an offense, but not a sin"

Pooja Sohni

unread,
Jan 20, 2010, 5:56:38 AM1/20/10
to dbi-...@perl.org

r...@savage.net.au

unread,
Jan 20, 2010, 11:10:44 PM1/20/10
to dbi-...@perl.org
Hi Pooja

See below.

Quoting "Pooja Sohni" <pso...@google.com>:

> Can't connect to data source '' because I can't work out what driver
> to use (it
> doesn't seem to contain a 'dbi:driver:' prefix and the DBI_DRIVER env
> var is not
> set) at reportdw.pl line 463
>
> Below is my db connection string format :
>
> use DBI;
> my $mysqlDbh = DBI::connect->
> ("dbi:mysql:dbname:hostname","username","password") or die

Try (for Postgres) dbname=my_db
or (for MySQL) database=my_db

I /really/ suggest you RTFM.

Pooja Sohni

unread,
Jan 21, 2010, 12:45:19 AM1/21/10
to m. allan noah, dbi-...@perl.org
I think i made a mistake, found it and fixed it yesterday.
Thanks for your help

Regards

0 new messages