Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Secure ways to use DBI?

by The Mad Hatter (Priest)
on Apr 17, 2003 at 02:48 UTC ( #251111=note: print w/replies, xml ) Need Help??


in reply to Secure ways to use DBI?

If you're using MySQL, take a look at .my.cnf and the other options file (described at the link). I think you can put the password in there and then chmod 600 it.

Replies are listed 'Best First'.
(jeffa) 2Re: Secure ways to use DBI?
by jeffa (Bishop) on Apr 17, 2003 at 02:54 UTC
    And while we are on the subject, here is the corresponding code to use that config file:
    my $dbh = DBI->connect( 'DBI:mysql:database:host:mysql_read_default_file=~/.my.cnf', undef,undef, {RaiseError=>1} );
    Big thanks to gmax for introducing me to the MySQL config file (and that code) a while back. :)

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://251111]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2021-01-16 00:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?