Home About Product News Contact 中文版
上一张 下一张
System Error

[2002] PDOException in Connection.php line 293

SQLSTATE[HY000] [2002] Connection refused

  1. $this->fetchType = $config['result_type'];
  2. }
  3. try {
  4. if (empty($config['dsn'])) {
  5. $config['dsn'] = $this->parseDsn($config);
  6. }
  7. if ($config['debug']) {
  8. $startTime = microtime(true);
  9. }
  10. $this->links[$linkNum] = new PDO($config['dsn'], $config['username'], $config['password'], $params);
  11. if ($config['debug']) {
  12. // 记录数据库连接信息
  13. Log::record('[ DB ] CONNECT:[ UseTime:' . number_format(microtime(true) - $startTime, 6) . 's ] ' . $config['dsn'], 'sql');
  14. }
  15. } catch (\PDOException $e) {
  16. if ($autoConnection) {
  17. Log::record($e->getMessage(), 'error');
  18. return $this->connect($autoConnection, $linkNum);
  19. } else {

Call Stack

  1. in Connection.php line 293
  2. at PDO->__construct('mysql:dbname=;host=1...', 'root', '', [0, 2, 0, ...]) in Connection.php line 293
  3. at Connection->connect() in Connection.php line 968
  4. at Connection->initConnect(false) in Mysql.php line 54
  5. at Mysql->getFields('area') in Query.php line 1739
  6. at Query->getTableInfo('area', 'pk') in Query.php line 1773
  7. at Query->getPk(['multi' => ['AND' => ['etitle' => ['ensret-equipmentcn'], 'isurl' => [1]]], 'where' => ['AND' => ['etitle' => 'ensret-equipmentcn', 'isurl' => 1]], 'table' => 'area', ...]) in Query.php line 2428
  8. at Query->find() in Common.php line 41
  9. at Common->_initialize() in Controller.php line 56
  10. at Controller->__construct(object(Request))
  11. at ReflectionClass->newInstanceArgs([object(Request)]) in App.php line 215
  12. at App::invokeClass('app\index\controller...') in Loader.php line 420
  13. at Loader::controller('show', 'controller', false, 'Error') in App.php line 390
  14. at App::module(['index', 'show', 'index'], ['app_debug' => true, 'app_trace' => false, 'app_status' => '', ...], true) in App.php line 295
  15. at App::exec(['type' => 'module', 'module' => ['index', 'show', 'index']], ['app_debug' => true, 'app_trace' => false, 'app_status' => '', ...]) in App.php line 123
  16. at App::run() in start.php line 18
  17. at require('/www/wwwroot/en.sret...') in index.php line 8

Environment Variables

GET Data

etitle
17
ctitle
rongyuzizhi
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
HTTP_CONNECTION
keep-alive
HTTP_CACHE_CONTROL
max-age=259200
HTTP_X_FORWARDED_FOR
10.1.218.135
HTTP_VIA
1.1 squid-proxy-5b5d847c96-45vkf (squid/6.13)
HTTP_ACCEPT_ENCODING
gzip, br, zstd, deflate
HTTP_USER_AGENT
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HTTP_ACCEPT
*/*
PATH_INFO
index/show/index
HTTP_HOST
en.sret-equipment.cn
REDIRECT_STATUS
200
SERVER_NAME
en.sret-equipment.cn
SERVER_PORT
80
SERVER_ADDR
172.31.170.63
REMOTE_PORT
56197
REMOTE_ADDR
216.73.216.53
SERVER_SOFTWARE
nginx/1.26.1
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/wwwroot/en.sret-equipment.cn
DOCUMENT_URI
/index.php
REQUEST_URI
/rongyuzizhi/17.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=index/show/index&etitle=17&ctitle=rongyuzizhi
SCRIPT_FILENAME
/www/wwwroot/en.sret-equipment.cn/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1768646386.8461
REQUEST_TIME
1768646386
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/en.sret-equipment.cn/app/
APP_AUTO_BUILD
true
APP_DEBUG
false
CONF_PATH
/www/wwwroot/en.sret-equipment.cn/config/
THINK_VERSION
5.0.9
THINK_START_TIME
1768646386.8463
THINK_START_MEM
359592
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/en.sret-equipment.cn/system/
LIB_PATH
/www/wwwroot/en.sret-equipment.cn/system/library/
CORE_PATH
/www/wwwroot/en.sret-equipment.cn/system/library/think/
TRAIT_PATH
/www/wwwroot/en.sret-equipment.cn/system/library/traits/
ROOT_PATH
/www/wwwroot/en.sret-equipment.cn/
EXTEND_PATH
/www/wwwroot/en.sret-equipment.cn/app/extend/
VENDOR_PATH
/www/wwwroot/en.sret-equipment.cn/app/vendor/
RUNTIME_PATH
/www/wwwroot/en.sret-equipment.cn/caches/
LOG_PATH
/www/wwwroot/en.sret-equipment.cn/caches/log/
CACHE_PATH
/www/wwwroot/en.sret-equipment.cn/caches/cache/
TEMP_PATH
/www/wwwroot/en.sret-equipment.cn/caches/temp/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false