At 3:49 PM -0700 04-25-2000, Kirk Rogers wrote:
>Is there a reason why I can't connect to MySQL with the following:
>
>
>...
>...
>7) my $dbh = DBI->connect("DBI:mysql:database=db;host=myhost.com", undef,
>undef, {RaiseError => 1} );
>...
>...
>
>my.cnf file:
>
>...
>...
># This will be passed to all mysql clients
>[client]
>#password=my_password
>port=3306
>#socket=MySQL
>
># Here is entries for some specific programs
># The following values assume you have at least 32M ram
>...
>...
>
>I keep getting:
>
>E:\Perl\progs>test_mysql.pl
>DBI->connect failed: Access denied for user: '@KROGERS' to database 'pcc' at
>E:\Perl\progs\test_mysql.pl line 7
The my.cnf file won't be used unless you tell DBI to use it. You
might try changing:
"DBI:mysql:database=db;host=myhost.com"
to:
"DBI:mysql:database=db;host=myhost.com;mysql_read_default_file=/path/to/my.cnf"
--
Paul DuBois, paul@stripped