[Catalyst] connection to DB

Tom Lanyon tom at netspot.com.au
Wed Apr 25 23:48:49 GMT 2007


On 26/04/2007, at 3:07 AM, Will Smith wrote:

> hi,I
>   I would like to ask for help on making a connection to a remote  
> database. My app is working good with localhost, now I move it to  
> another server and create a connection, I thought just change the  
> config of the myApp.pm. But I could not make the connection.


You specify the host in the DSN. Read the docs for DBD::MySQL and it  
will explain.
Ultimately you need something like:  
'dbi:mysql:database=myapp;hostname=192.168.2.115'

Cheers,
Tom

--
Tom Lanyon



More information about the Catalyst mailing list