Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Secure ways to use DBI?

by The Mad Hatter (Priest)
on Apr 17, 2003 at 02:48 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://251111]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-20 02:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found