#0 [10501]PDOException in PDOConnection.php line 795

SQLSTATE[HY000] [2002] Connection refused

  1. }
  2. } else {
  3. if ($this->reConnectTimes < 4 && $this->isBreak($e)) {
  4. ++$this->reConnectTimes;
  5. return $this->close()->getPDOStatement($sql, $bind, $master, $procedure);
  6. }
  7. }
  8. if ($e instanceof \PDOException) {
  9. throw new PDOException($e, $this->config, $this->getLastsql());
  10. } else {
  11. throw $e;
  12. }
  13. }
  14. }
  15. /**
  16. * 执行语句
  17. * @access protected

Call Stack

  1. in PDOConnection.php line 795
  2. at PDOConnection->getPDOStatement() in Mysql.php line 66
  3. at Mysql->getFields() in PDOConnection.php line 421
  4. at PDOConnection->getTableFieldsInfo() in PDOConnection.php line 361
  5. at PDOConnection->getSchemaInfo() in PDOConnection.php line 408
  6. at PDOConnection->getTableInfo() in PDOConnection.php line 492
  7. at PDOConnection->getFieldsType() in TableFieldInfo.php line 58
  8. at Query->getFieldsType() in TableFieldInfo.php line 81
  9. at Query->getFieldsBindType() in Builder.php line 328
  10. at Builder->buildWhere() in Builder.php line 299
  11. at Builder->parseWhere() in Mysql.php line 94
  12. at Mysql->select() in PDOConnection.php line 873
  13. at PDOConnection->think\db\{closure}() in PDOConnection.php line 699
  14. at PDOConnection->pdoQuery() in PDOConnection.php line 874
  15. at PDOConnection->find() in BaseQuery.php line 1127
  16. at BaseQuery->find()
  17. at call_user_func_array() in Model.php line 1059
  18. at Model::__callStatic() in view.php line 7
  19. at include('/www/wwwroot/www.sdh...') in Config.php line 92
  20. at Config->parse() in Config.php line 73
  21. at Config->load() in MultiApp.php line 226
  22. at MultiApp->loadApp() in MultiApp.php line 206
  23. at MultiApp->setApp() in MultiApp.php line 165
  24. at MultiApp->parseMultiApp() in MultiApp.php line 64
  25. at MultiApp->handle()
  26. at call_user_func() in Middleware.php line 142
  27. at Middleware->think\{closure}() in Pipeline.php line 85
  28. at Pipeline->think\{closure}() in SessionInit.php line 67
  29. at SessionInit->handle()
  30. at call_user_func() in Middleware.php line 142
  31. at Middleware->think\{closure}() in Pipeline.php line 85
  32. at Pipeline->think\{closure}() in TraceDebug.php line 71
  33. at TraceDebug->handle()
  34. at call_user_func() in Middleware.php line 142
  35. at Middleware->think\{closure}() in Pipeline.php line 85
  36. at Pipeline->think\{closure}() in Pipeline.php line 66
  37. at Pipeline->then() in Http.php line 207
  38. at Http->runWithRequest() in Http.php line 170
  39. at Http->run() in index.php line 25

Exception Datas

PDO Error Info
SQLSTATE HY000
Driver Error Code 2002
Driver Error Message Connection refused
Database Status
Error Code 10501
Error Message SQLSTATE[HY000] [2002] Connection refused
Error SQL
Database Config
type mysql
hostname 127.0.0.1
database hw
hostport 3306
dsn
params []
charset utf8mb4
prefix tp_
deploy 0
rw_separate false
master_num 1
slave_no
read_master false
fields_strict true
fields_cache false
trigger_sql 1
builder
query
break_reconnect false
break_match_str []
schema_cache_path /www/wwwroot/www.sdhwchem.com/runtime/schema/

Environment Variables

GET Data
cate 5
id 22
POST Dataempty
Filesempty
Cookies
PHPSESSID 336a3d1094f0e9d72dd4478aa77daf47
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_COOKIE PHPSESSID=336a3d1094f0e9d72dd4478aa77daf47
HTTP_ACCEPT_ENCODING gzip
HTTP_ACCEPT */*
HTTP_HOST www.sdhwchem.com
HTTP_USER_AGENT Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME www.sdhwchem.com
SERVER_PORT 80
SERVER_ADDR 10.0.49.2
REMOTE_PORT 34888
REMOTE_ADDR 107.158.192.110
SERVER_SOFTWARE nginx/1.22.1
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/www.sdhwchem.com/public
DOCUMENT_URI /index.php
REQUEST_URI /index/Article/info.html?cate=5&id=22
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/index/Article/info.html&cate=5&id=22
SCRIPT_FILENAME /www/wwwroot/www.sdhwchem.com/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1714075197.367
REQUEST_TIME 1714075197
0.057134s
Baidu
sogou