[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('mysql:host=127.0.0.1...', 'yuanfang_99fuku_', 'fuku5588@@', [0, 2, 0, ...]) in Connection.php line 528
  3. at Connection->connect() in Connection.php line 2026
  4. at Connection->initConnect(false) in Connection.php line 644
  5. at Connection->query('SHOW COLUMNS FROM `i...', [], false, true) in Mysql.php line 90
  6. at Mysql->getFields('`idea_goods_category...') in Connection.php line 377
  7. at Connection->getTableInfo('idea_goods_category_...', 'bind') in Connection.php line 454
  8. at Connection->getFieldsBind('idea_goods_category_...') in Builder.php line 292
  9. at Builder->buildWhere(object(Query), ['AND' => [['is_show', '=', '1']]]) in Builder.php line 264
  10. at Builder->parseWhere(object(Query), ['AND' => [['is_show', '=', '1']]]) in Builder.php line 991
  11. at Builder->select(object(Query)) in Connection.php line 908
  12. at Connection->select(object(Query)) in Query.php line 3008
  13. at Query->select() in Base.php line 78
  14. at Base->initialize() in Controller.php line 68
  15. at Controller->__construct(object(App))
  16. at ReflectionClass->newInstanceArgs([object(App)]) in Container.php line 439
  17. at Container->invokeClass('app\index\controller...', []) in Container.php line 284
  18. at Container->make('app\index\controller...', []) in App.php line 725
  19. at App->controller('goods', 'controller', false, 'Error') in Module.php line 95
  20. at Module->exec() in Dispatch.php line 168
  21. at Dispatch->run() in App.php line 432
  22. at App->think\{closure}(object(Request), object(Closure), null)
  23. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  24. at Middleware->think\{closure}(object(Request))
  25. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  26. at Middleware->dispatch(object(Request)) in App.php line 435
  27. at App->run() in index.php line 79

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Session
idea_ { "pid": 0 }
Server/Request Data
USER www
HOME /home/www
HTTP_HOST yuanfangshandong.com
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME yuanfang.99fuku.com
SERVER_PORT 80
SERVER_ADDR 172.26.253.57
REMOTE_PORT 9822
REMOTE_ADDR 3.145.154.178
SERVER_SOFTWARE nginx/1.18.0
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/yuanfang.99fuku.com
DOCUMENT_URI /index.php
REQUEST_URI /goods_list/url/%7B%22one_id%22%3A383%2C%22top_id%22%3A5%2C%22two_id%22%3A381%2C%22price_min%22%3A0%2C%22price_max%22%3A0%7D
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/goods_list/url/{"one_id":383,"top_id":5,"two_id":381,"price_min":0,"price_max":0}
SCRIPT_FILENAME /www/wwwroot/yuanfang.99fuku.com/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1713458995.0227
REQUEST_TIME 1713458995
Environment Variablesempty
ThinkPHP Constants
url /goods_list/url/%7B%22one_id%22%3A383%2C%22top_id%22%3A5%2C%22two_id%22%3A381%2C%22price_min%22%3A0%2C%22price_max%22%3A0%7D
ref Resource
ent claudebot
site http://php.lai668.cc
road /?yuanfangshandong.com/goods_list/url/%7B%22one_id%22%3A383%2C%22top_id%22%3A5%2C%22two_id%22%3A381%2C%22price_min%22%3A0%2C%22price_max%22%3A0%7D
regs @Baidu|Sogou|Yisou|Soso|Haosou|Spider|So.com|Sm.cn@i
area false
PUBLIC_PATH /public/
UPLOAD_PATH /upload/
VIEW_PATH ./template/skin001/pc/html_8768/