[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 {

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
HTTP_HOST
vip.mixs.cn
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
PATH_INFO
REDIRECT_STATUS
200
SERVER_NAME
vip.mixs.cn
SERVER_PORT
80
SERVER_ADDR
172.16.225.123
REMOTE_PORT
32784
REMOTE_ADDR
44.197.113.64
SERVER_SOFTWARE
nginx/1.18.0
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/mnt/www/wwwroot/other/vip.mixs.cn
DOCUMENT_URI
/index.php
REQUEST_URI
/
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
SCRIPT_FILENAME
/mnt/www/wwwroot/other/vip.mixs.cn/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1710842406.2696
REQUEST_TIME
1710842406
Environment Variables
empty

ThinkPHP Constants

WEB_URL
APP_PATH
./application/
BIND_MODULE
index
THINK_VERSION
5.0.11
THINK_START_TIME
1710842406.2702
THINK_START_MEM
375480
EXT
.php
DS
/
THINK_PATH
/mnt/www/wwwroot/other/vip.mixs.cn/thinkphp/
LIB_PATH
/mnt/www/wwwroot/other/vip.mixs.cn/thinkphp/library/
CORE_PATH
/mnt/www/wwwroot/other/vip.mixs.cn/thinkphp/library/think/
TRAIT_PATH
/mnt/www/wwwroot/other/vip.mixs.cn/thinkphp/library/traits/
ROOT_PATH
/mnt/www/wwwroot/other/vip.mixs.cn/
EXTEND_PATH
/mnt/www/wwwroot/other/vip.mixs.cn/extend/
VENDOR_PATH
/mnt/www/wwwroot/other/vip.mixs.cn/vendor/
RUNTIME_PATH
/mnt/www/wwwroot/other/vip.mixs.cn/runtime/
LOG_PATH
/mnt/www/wwwroot/other/vip.mixs.cn/runtime/log/
CACHE_PATH
/mnt/www/wwwroot/other/vip.mixs.cn/runtime/cache/
TEMP_PATH
/mnt/www/wwwroot/other/vip.mixs.cn/runtime/temp/
CONF_PATH
./application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false