Please upgrade here. These earlier versions are no longer being updated and have security issues.

i have a DB error

edited December 2011 in Vanilla 2.0 - 2.8

i sometimes have error.

FATAL ERROR IN: Gdn_Database.Connection();

"An error occurred while attempting to connect to the database"
SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (11)
LOCATION: /home/atauniso/public_html/library/database/class.database.php

57: $this->_Connection = new PDO(strtolower($this->Engine) . ':' . $this->Dsn, $this->User, $this->Password, $this->ConnectionOptions);
58: if($this->ConnectionOptions[1002])
59: $this->Query($this->ConnectionOptions[1002]);
60: } catch (Exception $ex) {

61: trigger_error(ErrorMessage('An error occurred while attempting to connect to the database', $this->ClassName, 'Connection', $ex->getMessage()), E_USER_ERROR);

62: }
63: }
64:
65: return $this->_Connection;

BACKTRACE:
[/home/atauniso/public_html/library/database/class.database.php] PHP::Gdn_ErrorHandler();
[/home/atauniso/public_html/library/database/class.database.php 61] PHP::trigger_error();
[/home/atauniso/public_html/library/database/class.database.php 283] Gdn_Database->Connection();
[/home/atauniso/public_html/library/database/class.sqldriver.php 1650] Gdn_Database->Query();
[/home/atauniso/public_html/library/database/class.sqldriver.php 676] Gdn_SQLDriver->Query();
[/home/atauniso/public_html/applications/dashboard/models/class.permissionmodel.php 476] Gdn_SQLDriver->Get();
[/home/atauniso/public_html/applications/dashboard/models/class.permissionmodel.php 188] PermissionModel->PermissionColumns();
[/home/atauniso/public_html/applications/dashboard/models/class.usermodel.php 234] PermissionModel->CachePermissions();
[/home/atauniso/public_html/library/core/class.session.php 318] UserModel->DefinePermissions();
[/home/atauniso/public_html/library/core/class.auth.php 36] Gdn_Session->Start();
[/home/atauniso/public_html/bootstrap.php 168] Gdn_Auth->StartAuthenticator();
[/home/atauniso/public_html/index.php 41] PHP::require_once();

how can i fix it ? not all time. sometimes i have it

Answers

Sign In or Register to comment.