Jump to content


Cannot connect to database


1 reply to this topic

#1 primitive

    Etomite Forum Newbie

  • Member
  • 12 posts

Posted 17 March 2010 - 11:58 PM

Hi all,

I see there have been quite a few of these similar posts recently about database connection issues, but after reading through them I am still stumped and would appreciate any help. We haven't changed anything recently and I don't think our host has either so I'm at a bit of a loss as to what is causing this.

When trying to log into the manager area I get a message saying Cannot connect to database! and similarly at the bottom of each page (under the footer which is cached) I get the following error message:

« Error »
Etomite encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
 
PHP error debug
  Error: 	mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)	 
  Error type/ Nr.: 	Warning - 2	 
  File: 	/var/www/html/index.php	 
  Line: 	1320	 
  Line 1320 source: 	if(@!$this->rs = mysql_connect($this->dbConfig['host'], $this->dbConfig['user'], $this->dbConfig['pass'])) { 	 
 
Parser timing
  MySQL: 	0.0000 s s	(0 Requests)
  PHP: 	0.0272 s s	 
  Total: 	0.0272 s s

The database had got a bit large with the logs so I've pruned them but otherwise the database looks ok to me - ie. not corrupted.

Relevant info:

Etomite Version 1.1

CentOS 4
Apache 2
Parallels Pro

PHP 5.2.8
MySQL 5.0.67

Any help would be very much appreciated.

Thanks

#2 primitive

    Etomite Forum Newbie

  • Member
  • 12 posts

Posted 18 March 2010 - 12:16 AM

OK - sorry all fixed.

The host changed the database host from localhost to 127.0.0.1 and forgot to inform us.

Thanks anyway.

Edited by primitive, 18 March 2010 - 01:54 AM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users