I use 1&1 for hosting using one of their shared hosting accounts, if you're using the same sort of thing you should specify the host name for the database server in the 'host' param, not a socket file path, as the database is on a separate server to the web server. You'll need to check the host name from the 1&1 admin panel.
If you're using a virtual or dedicated server or similar, please disregard everything I just said!
Regards,
Ian
________________________________________
IMiJ Ltd
http://www.imij.co.uk
http://www.ianmjones.com
http://twitter.com/ianmjones
On 6 Jan 2010, at 15:34, Dave wrote:
> I've been working on a website for a client on 1&1 server, and we are
> having an issue where cake won't connect to the database server. my
> database configuration is as follows:
>
> class DATABASE_CONFIG {
> var $default = array(
> 'driver' => 'mysql',
> 'persistent' => true,
> 'host' => 'localhost:/tmp/mysql5.sock',
> 'login' => 'dboxxxxxxxx',
> 'password' => 'xxxxxxx',
> 'database' => 'dbxxxxxxxx',
> 'prefix' => '',
> );
> }
>
> Once connecting I get the following errors:
>
> Warning (2): mysql_pconnect() [function.mysql-pconnect]: Can't connect
> to local MySQL server through socket '/tmp/mysql5.sock:3306' (2) [CORE/
> cake/libs/model/datasources/dbo/dbo_mysql.php, line 376]
>
> The list goes on and on, you can see more of the errors at:
> http://dev.qualityprotectioninc.com/
>
> I've contacted 1&1 tech support, that couldn't help, the database is
> running and working and can be connected too VIA ssh. Has anyone else
> had this issue? This is my first time dealing with this new sock thing
> and there is next too nothing on the internet in regards to it and
> CakePHP. What there is there I've tried to no avail.
> Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment