from the DBI docs: the connect string is: $dbh = DBI->connect($data_source, $username, $auth, \%attr);
where data_source = "DBI:mysql:NameOfDatabase:HostNameOrIP", where username = "allowable username" (try root first, root should always have permissions to databases, so the removes a possible user permission issue), where auth = "users_password" (default mysql install on Window's the "root" user password is blank ... very secure!) Assuming your database is on the computer your running the test scripts from try: -------------------- use DBI; my $dbh = DBI->connect('DBI:mysql:mysql:dbremer', 'root', '') or die "\nI could not connect to the database\n$DBI::errstr"; $dbh->disconnect; exit(0); ------------------ if your Perl.exe is still crashing, try removing DBI and DBD::Mysql and reinstalling them. ----- Original Message ----- From: "Dirk Bremer (NISC)" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, April 09, 2004 1:11 PM Subject: Re: MySQL/Perl > > <snip> > > > > > > I then installed DBD::mysql via PPM. I'm running Perl 5.6.1 > > > build 633 on a > > > Win 2k box, the same box that is hosting MySql. I have a small script: > > > > > > use diagnostics; > > > use strict; > > > use warnings; > > > > > > # Declare modules. > > > use FindBin qw($Bin); > > > use lib $Bin; > > > > > > use DBI; > > > > > > my $dbh = > > > DBI->connect('DBI:mysql:database=ftp_transfers;host=dbremer;po > > > rt=3306'); > > > unless (defined $dbh) {print("database connection failed\n")} > > > > Maybe it succeeded :-) Do you have any code following like.... > > > > print "Successful connection\n"; > > > Maybe I didn't make my self clear: it is not possible to get a successful > connection message as Perl itself is aborting, not the script per se. I am > positive that Perl is aborting on the connect line. > > Dirk Bremer - Systems Programmer II - ESS/AMS - NISC St. Peters > USA Central Time Zone > 636-922-9158 ext. 8652 fax 636-447-4471 > > [EMAIL PROTECTED] > www.nisc.cc > > > _______________________________________________ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs