[2002] PDOException in Connection.php line 295

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 295
  2. at PDO->__construct() in Connection.php line 295
  3. at Connection->connect() in Connection.php line 995
  4. at Connection->initConnect() in Connection.php line 348
  5. at Connection->query() in Mysql.php line 65
  6. at Mysql->getFields() in Query.php line 1921
  7. at Query->getTableInfo() in Query.php line 1955
  8. at Query->getPk() in Query.php line 2639
  9. at Query->find() in Index.php line 92
  10. at Index->getTemplateModel() in Index.php line 508
  11. at Index->get_content66()
  12. at ReflectionMethod->invokeArgs() in App.php line 343
  13. at App::invokeMethod() in App.php line 611
  14. at App::module() in App.php line 456
  15. at App::exec() in App.php line 139
  16. at App::run() in start.php line 19
  17. at require('/data/wwwroot/www/th...') in index.php line 23

Environment Variables

GET Data
empty

POST Data

payload
{"domain":"https:\/\/www.nextinit.com","uri":"\/tag\/2-56184.html","server":{"HTTP_REFERER":"","HTTP_USER_AGENT":"CCBot\/2.0 (https:\/\/commoncrawl.org\/faq\/)","HTTP_ACCEPT_LANGUAGE":"en-US,en;q=0.5","REMOTE_ADDR":"44.197.231.211"},"request":[]}
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
HTTP_CF_IPCOUNTRY
FR
HTTP_CDN_LOOP
cloudflare
HTTP_CF_CONNECTING_IP
2001:4b98:dc0:41:216:3eff:fe77:f4a5
HTTP_CONTENT_TYPE
multipart/form-data; boundary=------------------------31e4741fe0fb1dca
HTTP_ACCEPT
*/*
HTTP_CF_VISITOR
{"scheme":"https"}
HTTP_X_FORWARDED_PROTO
https
HTTP_CONTENT_LENGTH
388
HTTP_CF_RAY
87713b391f8fd682-CDG
HTTP_X_FORWARDED_FOR
2001:4b98:dc0:41:216:3eff:fe77:f4a5
HTTP_ACCEPT_ENCODING
gzip, br
HTTP_CONNECTION
Keep-Alive
HTTP_HOST
www.wordprass.org
PATH_INFO
/content66
REDIRECT_STATUS
200
SERVER_NAME
www.wordprass.org
SERVER_PORT
80
SERVER_ADDR
176.97.112.39
REMOTE_PORT
11378
REMOTE_ADDR
172.71.130.163
SERVER_SOFTWARE
nginx/1.22.1
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/data/wwwroot/www/public
DOCUMENT_URI
/index.php
REQUEST_URI
/content66
SCRIPT_NAME
/index.php
CONTENT_LENGTH
388
CONTENT_TYPE
multipart/form-data; boundary=------------------------31e4741fe0fb1dca
REQUEST_METHOD
POST
QUERY_STRING
s=/content66
SCRIPT_FILENAME
/data/wwwroot/www/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1713575182.2843
REQUEST_TIME
1713575182
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/data/wwwroot/www/public/../application/
THINK_VERSION
5.0.24
THINK_START_TIME
1713575182.2846
THINK_START_MEM
360656
EXT
.php
DS
/
THINK_PATH
/data/wwwroot/www/thinkphp/
LIB_PATH
/data/wwwroot/www/thinkphp/library/
CORE_PATH
/data/wwwroot/www/thinkphp/library/think/
TRAIT_PATH
/data/wwwroot/www/thinkphp/library/traits/
ROOT_PATH
/data/wwwroot/www/
EXTEND_PATH
/data/wwwroot/www/extend/
VENDOR_PATH
/data/wwwroot/www/vendor/
RUNTIME_PATH
/data/wwwroot/www/runtime/
LOG_PATH
/data/wwwroot/www/runtime/log/
CACHE_PATH
/data/wwwroot/www/runtime/cache/
TEMP_PATH
/data/wwwroot/www/runtime/temp/
CONF_PATH
/data/wwwroot/www/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
FILTER_VALIDATE_BOOL
258
HTMLPURIFIER_PREFIX
/data/wwwroot/www/vendor/ezyang/htmlpurifier/library
ADDON_PATH
/data/wwwroot/www/addons/