[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...', 'daolushi_cn', 'N5dTaPR6cJYJyGLn', [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 `c...', [], false, true) in Mysql.php line 90
  6. at Mysql->getFields('`cmf_theme_file`') in Connection.php line 377
  7. at Connection->getTableInfo('cmf_theme_file', 'pk') in Connection.php line 414
  8. at Connection->getPk('cmf_theme_file') in Query.php line 2454
  9. at Query->getPk(['where' => ['AND' => [['theme', '=', 'daolu'], ['file', '=', 'portal/article']]], 'table' => 'cmf_theme_file', 'field' => '*', ...]) in Connection.php line 793
  10. at Connection->find(object(Query)) in Query.php line 3132
  11. at Query->find() in ThemeModel.php line 108
  12. at ThemeModel->updateThemeFiles('daolu') in ThemeModel.php line 51
  13. at ThemeModel->updateTheme('daolu') in HomeBaseController.php line 181
  14. at HomeBaseController->getThemeFileMore('/www/wwwroot/daolush...') in HomeBaseController.php line 84
  15. at HomeBaseController->fetch('/www/wwwroot/daolush...') in LoginController.php line 40
  16. at LoginController->index()
  17. at ReflectionMethod->invokeArgs(object(LoginController), []) in Container.php line 395
  18. at Container->invokeReflectMethod(object(LoginController), object(ReflectionMethod), []) in Module.php line 132
  19. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  20. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  21. at Middleware->think\{closure}(object(Request))
  22. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  23. at Middleware->dispatch(object(Request), 'controller') in Module.php line 137
  24. at Module->exec() in Dispatch.php line 168
  25. at Dispatch->run() in App.php line 484
  26. at App->think\{closure}(object(Request), object(Closure), null)
  27. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  28. at Middleware->think\{closure}(object(Request))
  29. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  30. at Middleware->dispatch(object(Request)) in App.php line 487
  31. at App->run() in index.php line 35

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_HOST daolushi.cn
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME daolushi.cn
SERVER_PORT 80
SERVER_ADDR 172.17.139.158
REMOTE_PORT 44342
REMOTE_ADDR 44.201.64.238
SERVER_SOFTWARE nginx/1.20.2
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/daolushi.cn/public_html
DOCUMENT_URI /index.php
REQUEST_URI /user/login/index.html
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/user/login/index.html
SCRIPT_FILENAME /www/wwwroot/daolushi.cn/public_html/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711622399.8723
REQUEST_TIME 1711622399
Environment Variablesempty
ThinkPHP Constants
APP_DEBUG true
CMF_ROOT /www/wwwroot/daolushi.cn/
CMF_DATA /www/wwwroot/daolushi.cn/data/
APP_PATH /www/wwwroot/daolushi.cn/app/
WEB_ROOT /www/wwwroot/daolushi.cn/public_html/
HTMLPURIFIER_PREFIX /www/wwwroot/daolushi.cn/vendor/ezyang/htmlpurifier/library
0.144190s