List:MySQL and Perl« Previous MessageNext Message »
From:Jochen Wiedmann Date:July 26 1999 9:19am
Subject:Re: unable to connect to database
View as plain text  
Jason Errol Draut wrote:
> 
> I tried the following perl script and got the following error message:
> 
> #!/usr/bin/perl
> use DBI;
> $user = "root";
> $pswd = '';
> $options = "localhost";
> $driver = "mysql";
> $database = "carstuff";
> $dsn = "DBI:$driver:database=$database:$options";
> $car_dbhand = DBI->connect($dsn,$user, $pswd)||
>   die("Connect error: $DBI::errstr");

Your script does the same like

	mysql --user=root --password="" --host=localhost carstuff

Does that work?


Bye,

Jochen


-- 
Jochen Wiedmann						joe@stripped
Life has brown and green eyes. :-)			+49 7123 14887
Thread
unable to connect to databaseJason Errol Draut24 Jul
  • Re: unable to connect to databaseJochen Wiedmann26 Jul