提示:500

SQLSTATE[HY000] [2002] Connection refused

源文件

/data/www/zq.com/framework/db/CSnsConnection.php(45)

00033:         try
00034:         {
00035:             
00036:             $this->dbh = new PDO($connstr, $dsn['user'], $dsn['pass']);
00037:             $serverInfo = $this->dbh->getAttribute(PDO::ATTR_SERVER_INFO);
00038:             if ($serverInfo == 'MySQL server has gone away')
00039:                 $this->dbh = new PDO($connstr, $dsn['user'], $dsn['pass']);    
00040: 
00041:             $this->initConnection($this->dbh, $dsn);
00042:         }
00043:         catch(PDOException $e)
00044:         {
00045: throw new CSnsDbException($e->getMessage());
00046: } 00047: } 00048: 00049: /** 00050: * 取当前connection 00051: * 00052: * @return 00053: * 数据库连接对象 00054: */ 00055: public function getConnection() 00056: { 00057: return $this->dbh;

堆栈追踪

#0 /data/www/zq.com/framework/db/CSnsConnection.php(93): CSnsConnection->__construct('mysql://2016ydb...')
#1 /data/www/zq.com/framework/db/CSnsDbTools.php(199): CSnsConnection::getInstance('mysql://2016ydb...')
#2 /data/www/zq.com/www/plugins/default/class/impls/DefaultModel.php(605): CSnsDbTools->execute('SELECT * FROM c...', Array)
#3 /data/www/zq.com/www/plugins/default/controllers/DefaultController.php(171): DefaultModel->savekeyword('\xE6\xA0\xA1\xE6\x9C\x8D\xE9\x9D\xA2\xE6\x96\x99')
#4 /data/www/zq.com/framework/web/actions/CInlineAction.php(32): DefaultController->actionSearch()
#5 /data/www/zq.com/framework/web/CSnsController.php(120): CInlineAction->run()
#6 /data/www/zq.com/framework/web/CSnsController.php(104): CSnsController->runAction(Object(CInlineAction))
#7 /data/www/zq.com/framework/web/CSnsController.php(93): CSnsController->runActionWithFilters(Object(CInlineAction), Array)
#8 /data/www/zq.com/framework/web/CSnsWebApplication.php(442): CSnsController->run('search')
#9 /data/www/zq.com/framework/web/CSnsWebApplication.php(89): CSnsWebApplication->runController('default/default...')
#10 /data/www/zq.com/framework/base/CSnsApplication.php(137): CSnsWebApplication->processRequest()
#11 /data/www/zq.com/www/web/cnmader.com/index.php(22): CApplication->run()
#12 {main}

当网页服务器处理您的请求时, 发生以上错误.

如果您认为此错误是服务器造成的,请与管理员联系 the webmaster.

谢谢.

2019-10-06 23:20:12