Re: Perl DBI:mysql

2002-07-18 Thread Stephen Spalding
Here's a test script that I use to check out a new database whenever I create a new one: #!/usr/bin/perl use DBI; $database = "oncall"; $user = "oncall"; $code = "1donca"; print "INFO: Connecting to database: $database\n"; $connection = DBI->connect("DBI:mysql:$database", $user, $cod

Re: Perl DBI:mysql

2002-07-17 Thread Andy Schuler
I think you're missing the server information in your script. If it's on the same machine as the mysql server then localhost would probably work fine. ie my ($dsn) = "DBI:mysql:databasename:localhost"; my ($username) = "username"; my ($pass) = "password"; $dbh = DBI->connect ($dsn, $username, $pa

Perl DBI:mysql

2002-07-17 Thread Starman P
All i wrote the following perl script and tried to connect to mysql database: # File name fig13.pl #!/usr/bin/perl -w use DBI; $dbh = DBI->connect("DBI:mysql:zipcodes","username","mypass"); if ($dbh) { print "Connection successful\n"; } then after giving execute permission, i tried to run it by