Tom, I tried the following:
#!/perl use warnings; use strict; use DBI; # my $dbh=DBI->connect( 'DBI:mysql:test:GJWPP88', 'Jerry', 'password' ) or die "Cannot connect -> gjwpp88!!<br>$DBI::errstr"; #Local Host Name - GJWPP88 #Local User Name - Jerry #database under GJWPP88 - mysql and test my $driver = "mysql"; my $server = "GJWPP88"; my $database = "test"; my $url = "DBI:$driver:$database:$server"; my $user = "Jerry"; my $pass = "password"; my $dbh = DBI->connect($url, $user, $pass) || die "Couldn't connect to database: " . DBI->errstr; And I get the following: DBI connect<'test:GJWPP88','Jerry'....> failed: Access denied for user 'Jerry'@'gjwpp88' <using password: yes> at line 17 All I am wanting to do is connect and create a new table. Any ideas? Thanks, Jerry -----Original Message----- From: Tom Crimmins [mailto:[EMAIL PROTECTED] Sent: Monday, January 03, 2005 3:52 PM To: Gerald Preston Cc: mysql@lists.mysql.com Subject: RE: first time accessing Try something like this: use DBI; my $driver = "mysql"; my $server = "myhost"; my $database = "mydb"; my $url = "DBI:$driver:$database:$server"; my $user = "username"; my $pass = "password"; my $dbh = DBI->connect($url, $user, $pass) || die "Couldn't connect to database: " . DBI->errstr; Obviously you don't have to make everything a variable, this is just one possibility. --- Tom Crimmins Interface Specialist Pottawattamie County, Iowa -----Original Message----- From: Gerald Preston Sent: Monday, January 03, 2005 7:40 PM To: mysql users Subject: first time accessing I am making my first attempt to access MySQL with Perl #!/perl use warnings; use strict; use dbi; my $dbh=DBI->connect( 'dbi:MySQL, 'user', 'pass' ) or die "Cannot connect -> !<br>$DBI::errstr"; and I get the following error: Can't connect to data source dbi:MySQL, no data driver specified and DBS_DSN env var not set Any ideas? Thanks, Jerry -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]