[2002] PDOException in Connection.php line 528

SQLSTATE[HY000] [2002] No such file or directory

  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=localhost...', 'root', '28cf8e7c29e11034', [0, 2, 0, ...]) in Connection.php line 528
  3. at Connection->connect() in Connection.php line 2024
  4. at Connection->initConnect(false) in Connection.php line 644
  5. at Connection->query('SHOW COLUMNS FROM `t...', [], false, true) in Mysql.php line 90
  6. at Mysql->getFields('`tp_cate`') in Connection.php line 377
  7. at Connection->getTableInfo('tp_cate', 'bind') in Connection.php line 454
  8. at Connection->getFieldsBind('tp_cate') in Builder.php line 292
  9. at Builder->buildWhere(object(Query), []) in Builder.php line 264
  10. at Builder->parseWhere(object(Query), []) in Builder.php line 998
  11. at Builder->select(object(Query)) in Connection.php line 908
  12. at Connection->select(object(Query)) in Query.php line 3028
  13. at Query->select() in route.php line 34
  14. at include('/www/wwwroot/uidir.c...') in App.php line 554
  15. at App->routeInit() in App.php line 259
  16. at App->initialize() in App.php line 379
  17. at App->run() in index.php line 19

Environment Variables

GET Data
s /search-商丘Minquan路3号Ningjing训练日中心小学举行升旗仪式-2.html
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_CONNECTION keep-alive
HTTP_VIA 1.1 PSmgasbIAD1pb76:13 (W), 1.1 PSrbJP1qr86:0 (W)
HTTP_X_INITIAL_URL https://www.uidir.com/search-%E5%95%86%E4%B8%98Minquan%E8%B7%AF3%E5%8F%B7Ningjing%E8%AE%AD%E7%BB%83%E6%97%A5%E4%B8%AD%E5%BF%83%E5%B0%8F%E5%AD%A6%E4%B8%BE%E8%A1%8C%E5%8D%87%E6%97%97%E4%BB%AA%E5%BC%8F-2.html
HTTP_X_WS_REQUEST_ID 6606709f_PSmgasbIAD1pb76_42512-6188
HTTP_X_FORWARDED_IP 18.207.126.53
HTTP_X_CDN_SRC_PORT 41950
HTTP_CDN_SRC_IP 18.207.126.53
HTTP_REFERER http://www.uidir.com/search-%E5%95%86%E4%B8%98Minquan%E8%B7%AF3%E5%8F%B7Ningjing%E8%AE%AD%E7%BB%83%E6%97%A5%E4%B8%AD%E5%BF%83%E5%B0%8F%E5%AD%A6%E4%B8%BE%E8%A1%8C%E5%8D%87%E6%97%97%E4%BB%AA%E5%BC%8F-2.html
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
HTTP_X_FORWARDED_FOR 18.207.126.53
HTTP_HOST www.uidir.com
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME uidir.com
SERVER_PORT 80
SERVER_ADDR 172.28.76.145
REMOTE_PORT 44936
REMOTE_ADDR 14.128.1.82
SERVER_SOFTWARE nginx/1.21.0
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/uidir.com/public
DOCUMENT_URI /index.php
REQUEST_URI /search-%E5%95%86%E4%B8%98Minquan%E8%B7%AF3%E5%8F%B7Ningjing%E8%AE%AD%E7%BB%83%E6%97%A5%E4%B8%AD%E5%BF%83%E5%B0%8F%E5%AD%A6%E4%B8%BE%E8%A1%8C%E5%8D%87%E6%97%97%E4%BB%AA%E5%BC%8F-2.html
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/search-%E5%95%86%E4%B8%98Minquan%E8%B7%AF3%E5%8F%B7Ningjing%E8%AE%AD%E7%BB%83%E6%97%A5%E4%B8%AD%E5%BF%83%E5%B0%8F%E5%AD%A6%E4%B8%BE%E8%A1%8C%E5%8D%87%E6%97%97%E4%BB%AA%E5%BC%8F-2.html
SCRIPT_FILENAME /www/wwwroot/uidir.com/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711697984.9817
REQUEST_TIME 1711697984
Environment Variablesempty
ThinkPHP Constants
ADDON_PATH /www/wwwroot/uidir.com/addons/
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