On Mon, Nov 12, 2001 at 01:55:13AM -0600, Mark Browne wrote:
> I *just* got my first web page filled with data from a MySQL table.
> There was a connection through MySQL,  PERL, Apache and a browser.
> It's still amazes me how a few lines of text on the screen
> can put me in such a good mood :-)

Gratzies

> Some random notes to other clueless newbies (like myself)
> 1) Ya gotta use CPAN to get the perl MySQL-DBI modules installed.
> Period.

Debian Package:

    libdbd-mysql-perl - mySQL database interface for Perl

Installation process:

    bash# apt-get install libdbd-mysql-perl

> 2) I had the most troubles with the connect string.
> 2a) The localhost name thing screwed me up bigtime.
> 2b) The database user and password items are another minefield.
> They are not necessarily the same as your OS user and login name.
> MySQL has it's own user and password control.

Correct.  Most databases do not use PAM authentication.  PostgreSQL can
restrict local users to using their UNIX usernames w/o a password, but
largely, databases aren't intrinsically connected to UNIX accounts.
This is a good thing, if you think about it.  It would be nice for
different authentification schemes to be used, and I believe there are
some patches out there to allow it, but they're not mainstream in
general.

> 3) I has to comment the "use strict" out to get rid of the compile
> errors in the Apache error log.  Still don't know why the "strict"
> thing is so picky.

It's so you don't make mistakes.  You've obviously made mistakes. ;-)
If you correct them, you won't see the errors in the log files. ;-)

> Do you have to declare vars in perl under "strict" rules?

Um, yes!  That's the whole idea of strict!

> 4) The Apache error log is your best friend in sorting why the stuff is not
> working.

Yep.

-- 
Chad Walstrom <chewie at wookimus.net>                 | a.k.a. ^chewie
http://www.wookimus.net/                            | s.k.a. gunnarr
Key fingerprint = B4AB D627 9CBD 687E 7A31  1950 0CC7 0B18 206C 5AFD

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://shadowknight.real-time.com/pipermail/tclug-list/attachments/20011112/d86498a7/attachment.pgp