chhotii: (diploma)
[personal profile] chhotii
Astonishingly, for the first time ever I am writing CGI scripts for web pages that will be accessible from off-campus. (Catching up on those mid-1990's technical skills...) Of course I am using mysql for all server-side data handling, so each script starts off with:

$dbh = DBI->connect("dbi:mysql:SleepCog:localhost", 'cgi', 'MyFavoritePassword') ||
die "cannot open database: $!";

Um. See the 3rd argument in the call to DBI->connect()? That's the database password for the database user named cgi. This seems wrong, somehow, to have a password hard-coded into scripts, but offhand I'm not seeing other options. What's the right way to do this?
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

chhotii: (Default)
chhotii

July 2023

S M T W T F S
      1
2345678
9101112131415
16 171819202122
23 242526272829
3031     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 26th, 2026 08:24 am
Powered by Dreamwidth Studios