Gossamer Forum
Home : General : Databases and SQL :

MySql... Again...

Quote Reply
MySql... Again...
Hi!

I don't have any experiences with Perl, so please explain everything like I was a child Smile

I has just installed ActivePerl on my IIS 5 server. It works fine. I have used MySql databases with my ASP work for about 1 year, and I knows almost everything about that. But I would like to use the MySql database in my Perl/CGI scripts. I have read that I need DBI before I can do that. I got MySqlMan, but it wont work.

Anybody who can tell me what to do? I have no clue...



- Jimmi Kolmorgen



Sorry about my English, its not so good because im a Dane Wink
Quote Reply
Re: [Qlutzy] MySql... Again... In reply to
>>
I have used MySql databases with my ASP work for about 1 year, and I knows almost everything about that.
<<

You know everything after a year?....I wish I had a memory like yours ;)

As for mysql/perl, there are tons of resources on the net, namely perldoc.com and mysql.com

Some specific links:

http://perldoc.com/...p;restrict=perl5.6.1

http://dbi.perl.org/doc/index.html
Quote Reply
Re: [Paul] MySql... Again... In reply to
>>

You know everything after a year?....I wish I had a memory like yours ;)

<<



Im working on one of the biggest Soccersites in Denmark, so I have to update with a lot ot the things going on behind the site Wink



Is it any of these files???

http://www.activestate.com/...ips/5xx-builds-only/



And how does I install it?
Quote Reply
Re: [Qlutzy] MySql... Again... In reply to
Hi,

Use `ppm`. It's Activestates package manager. You'll need to type from command prompt (may need to cd \perl\bin):

ppm install DBI

and also:

ppm install DBD-mysql

and might as well put on:

ppm install Digest-MD5
ppm install MIME-Base64

as they are very useful. Once that's installed, try a test script:

use DBI;
my $dbh = DBI->connect('DBI:mysql:DATABASENAME:localhost', 'USERNAME', 'PASSWORD', { RaiseError => 1 });
print "Connected!\n";
$dbh->disconnect;

and you should be good to go!

Cheers,

Alex
--
Gossamer Threads Inc.

Last edited by:

Alex: Jun 8, 2002, 10:49 AM
Quote Reply
Re: [Alex] MySql... Again... In reply to
Thanks... It WORKS!



And its a great site you got here... Thumbs up!Wink