Guest_imported
New member
- Jan 1, 1970
- 0
Hi,
Newbie here to perl and mysql.
I want to pass the database, user, password to the
DBI->connect() method but it doesnt work.
the troubled code looks like this..
use strict;
use DBD::mysql;
# Create list of variable
my $database = "test";
my $user = 'joe';
my $password = 'joe';
#create database handle
my $db_hndle = DBI->connect("DBI:mysql:database=$database",$user,$password) || die "Didn't connect to database";
#####Error#####
DBI->connect(database=wehookup_users) failed: Access denied for user: 'joe
@localhost' (Using password: YES) at C:\Program Files\Komodo\MyWork\mysql\mysqlprac.pl line 30
yes the password is correct! and when I don't use variables it works fine.
THanx in advance
Newbie here to perl and mysql.
I want to pass the database, user, password to the
DBI->connect() method but it doesnt work.
the troubled code looks like this..
use strict;
use DBD::mysql;
# Create list of variable
my $database = "test";
my $user = 'joe';
my $password = 'joe';
#create database handle
my $db_hndle = DBI->connect("DBI:mysql:database=$database",$user,$password) || die "Didn't connect to database";
#####Error#####
DBI->connect(database=wehookup_users) failed: Access denied for user: 'joe
@localhost' (Using password: YES) at C:\Program Files\Komodo\MyWork\mysql\mysqlprac.pl line 30
yes the password is correct! and when I don't use variables it works fine.
THanx in advance