永乐高030net|会员登录

[2002] PDOException in Connection.php line 528

SQLSTATE[HY000] [2002] Connection refused

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

Call Stack

  1. in Connection.php line 528
  2. at PDO->__construct() in Connection.php line 528
  3. at Connection->connect() in Connection.php line 2024
  4. at Connection->initConnect() in Connection.php line 644
  5. at Connection->query() in Mysql.php line 90
  6. at Mysql->getFields() in Connection.php line 377
  7. at Connection->getTableInfo() in Connection.php line 454
  8. at Connection->getFieldsBind() in Builder.php line 292
  9. at Builder->buildWhere() in Builder.php line 264
  10. at Builder->parseWhere() in Builder.php line 998
  11. at Builder->select() in Connection.php line 1370
  12. at Connection->column() in Query.php line 628
  13. at Query->column() in Index.php line 565
  14. at Index->getproduct() in Index.php line 31
  15. at Index->initialize() in Controller.php line 68
  16. at Controller->__construct()
  17. at ReflectionClass->newInstanceArgs() in Container.php line 439
  18. at Container->invokeClass() in Container.php line 284
  19. at Container->make() in App.php line 723
  20. at App->controller() in Module.php line 100
  21. at Module->exec() in Dispatch.php line 168
  22. at Dispatch->run() in App.php line 432
  23. at App->think\{closure}()
  24. at call_user_func_array() in Middleware.php line 185
  25. at Middleware->think\{closure}()
  26. at call_user_func() in Middleware.php line 130
  27. at Middleware->dispatch() in App.php line 435
  28. at App->run() in index.php line 22

Environment Variables

GET Data
id 31
POST Dataempty
Filesempty
Cookies
think_shistory think:["","8394-8393","9149","9124","1"]
PHPSESSID hvvvsg358hql8ajhfard3m8ce3
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_COOKIE think_shistory=think%3A%5B%22%22%2C%228394-8393%22%2C%229149%22%2C%229124%22%2C%221%22%5D; PHPSESSID=hvvvsg358hql8ajhfard3m8ce3
HTTP_ACCEPT_ENCODING gzip
HTTP_ACCEPT */*
HTTP_HOST www.hnjkjm.com
HTTP_USER_AGENT Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME hnjkjm.com
SERVER_PORT 80
SERVER_ADDR 172.26.175.130
REMOTE_PORT 35798
REMOTE_ADDR 173.232.242.50
SERVER_SOFTWARE nginx/1.19.8
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/hnjkjm.com/public
DOCUMENT_URI /index.php
REQUEST_URI /down_file?id=31
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=//down_file&id=31
SCRIPT_FILENAME /www/wwwroot/hnjkjm.com/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1674906402.9162
REQUEST_TIME 1674906402
Environment Variablesempty
ThinkPHP Constants
IF_PUBLIC true
ROOT_PATH /www/wwwroot/hnjkjm.com/public/../
APP_PATH /www/wwwroot/hnjkjm.com/public/../application/
DS /
ADDON_PATH /www/wwwroot/hnjkjm.com/public/../addons/
ROOT_URL /
TEMPLATE_PATH /www/wwwroot/hnjkjm.com/public/../templates/
PINYIN_DEFAULT 4096
PINYIN_TONE 2
PINYIN_NO_TONE 4
PINYIN_ASCII_TONE 8
PINYIN_NAME 16
PINYIN_KEEP_NUMBER 32
PINYIN_KEEP_ENGLISH 64
PINYIN_UMLAUT_V 128
PINYIN_KEEP_PUNCTUATION 256