|Syntactic Confectionery Delight|
Keeping MySQL connection parameters in a safe placeby wfsp (Abbot)
|on Dec 27, 2005 at 15:00 UTC||Need Help??|
Your Mother alerted me to a neat trick for keeping MySQL connection parameters in a safe place by using the mysql_read_default_file connection option.
A couple of points to note:
Note there is no connection info in the script at all. It's tucked away nicely in a cnf file. For example:
The DBD::mysql docs give an indication on how to use option files but more can be found on the MySQL site:
The last link points out that you need the two undef parameters in the connect statement.
MySQL -> 4.0.17 (remote)
DBI 1.32 (remote)
DBD::MySQL 2.0419 (remote)
Hope this is of some use and many thanks to Your Mother for the pointer.