=

X


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('redirecturl') in Query.php line 1739
  6. at Query->getTableInfo('redirecturl', 'type') in Query.php line 1787
  7. at Query->getFieldsType('redirecturl') in Query.php line 1793
  8. at Query->getFieldsBind('redirecturl') in Builder.php line 254
  9. at Builder->buildWhere([], ['order' => ['id desc'], 'table' => 'redirecturl', 'where' => [], ...]) in Builder.php line 224
  10. at Builder->parseWhere([], ['order' => ['id desc'], 'table' => 'redirecturl', 'where' => [], ...]) in Builder.php line 673
  11. at Builder->select(['order' => ['id desc'], 'table' => 'redirecturl', 'where' => [], ...]) in Query.php line 2306
  12. at Query->select() in common.php line 25
  13. at redirecturl() in Common.php line 16
  14. at Common->_initialize() in Controller.php line 56
  15. at Controller->__construct(object(Request))
  16. at ReflectionClass->newInstanceArgs([object(Request)]) in App.php line 215
  17. at App::invokeClass('app\index\controller...') in Loader.php line 420
  18. at Loader::controller('show', 'controller', false, 'Error') in App.php line 390
  19. at App::module(['index', 'show', 'index'], ['app_debug' => true, 'app_trace' => false, 'app_status' => '', ...], true) in App.php line 295
  20. at App::exec(['type' => 'module', 'module' => ['index', 'show', 'index']], ['app_debug' => true, 'app_trace' => false, 'app_status' => '', ...]) in App.php line 123
  21. at App::run() in start.php line 18
  22. at require('/www/wwwroot/jujiaom...') in index.php line 8

Environment Variables

GET Data

id
113
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
HTTP_CONNECTION
Keep-Alive
HTTP_HOST
www.jujiaomedia.cn
HTTP_ACCEPT_ENCODING
br,gzip
HTTP_ACCEPT_LANGUAGE
en-US,en;q=0.5
HTTP_ACCEPT
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT
CCBot/2.0 (https://commoncrawl.org/faq/)
PATH_INFO
index/show/index
REDIRECT_STATUS
200
SERVER_NAME
jujiaomedia.cn
SERVER_PORT
80
SERVER_ADDR
172.17.143.29
REMOTE_PORT
35664
REMOTE_ADDR
44.210.237.158
SERVER_SOFTWARE
nginx/1.21.0
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/wwwroot/jujiaomedia.cn
DOCUMENT_URI
/index.php
REQUEST_URI
/index.php?s=index/show/index&id=113
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=index/show/index&id=113
SCRIPT_FILENAME
/www/wwwroot/jujiaomedia.cn/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1664538595.0119
REQUEST_TIME
1664538595
Environment Variables
empty

ThinkPHP Constants

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