[Catalyst] Newbie Question about Database
Ashley
apv at sedition.com
Tue Jan 20 05:42:55 GMT 2009
On Jan 19, 2009, at 7:06 PM, Charlie Garrison wrote:
> Good afternoon,
>
> On 19/01/09 at 8:11 PM -0500, Robert L Cochran
> <cochranb at speakeasy.net> wrote:
>
>> I also wonder if Catalyst can make use of a .my.cnf file if there is
>> one. Why is this important? Because you can keep your connection
>> password private.
>
> You can pass a path to a "user defaults" file as part of the DBI
> connect string. I don't recall the syntax though.
This is how I usually do it. The __path_to()__ in configs gets
expanded properly.
Model::DBIC:
schema_class: MyApp::Schema
connect_info:
- dbi:mysql:myappdb;mysql_read_default_file=__path_to
(etc/.mysql.cnf)__
- ~
- ~
- RaiseError: 1
PrintError: 0
AutoCommit: 1
ChopBlanks: 1
-Ashley
More information about the Catalyst
mailing list