[2002] PDOException in Connection.php line 293

SQLSTATE[HY000] [2002] Connection refused

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

Call Stack

  1. in Connection.php line 293
  2. at PDO->__construct('mysql:host=127.0.0.1...', 'root', '!@mysql123', [0, 2, 0, ...]) in Connection.php line 293
  3. at Connection->connect() in Connection.php line 989
  4. at Connection->initConnect(false) in Connection.php line 346
  5. at Connection->query('SHOW COLUMNS FROM `c...', [], false, true) in Mysql.php line 65
  6. at Mysql->getFields('`cmf_theme_file`') in Query.php line 1757
  7. at Query->getTableInfo('cmf_theme_file', 'pk') in Query.php line 1791
  8. at Query->getPk(['multi' => ['AND' => ['theme' => ['simpleboot3'], 'file' => ['portal/article']]], 'where' => ['AND' => ['theme' => 'simpleboot3', 'file' => 'portal/article']], 'table' => 'cmf_theme_file', ...]) in Query.php line 2487
  9. at Query->find() in ThemeModel.php line 104
  10. at ThemeModel->updateThemeFiles('simpleboot3') in ThemeModel.php line 51
  11. at ThemeModel->updateTheme('simpleboot3') in HomeBaseController.php line 150
  12. at HomeBaseController->getThemeFileMore('themes/simpleboot3/u...') in HomeBaseController.php line 85
  13. at HomeBaseController->fetch('themes/simpleboot3/u...') in LoginController.php line 35
  14. at LoginController->index()
  15. at ReflectionMethod->invokeArgs(object(LoginController), []) in App.php line 343
  16. at App::invokeMethod([object(LoginController), 'index'], []) in App.php line 600
  17. at App::module(['user', 'login', 'index'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], true) in App.php line 456
  18. at App::exec(['type' => 'module', 'module' => ['user', 'login', 'index']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  19. at App::run() in index.php line 45

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty

Session

think
{ "login_http_referer": "http:\/\/tcrm.inxx.top\/user\/profile\/center.html" }

Server/Request Data

USER
www
HOME
/home/www
HTTP_HOST
tcrm.inxx.top
HTTP_REFERER
http://tcrm.inxx.top/user/profile/center.html
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
PATH_INFO
user/login/index.html
SCRIPT_FILENAME
/home/wwwroot/tcrm/public/index.php
REDIRECT_STATUS
200
SERVER_NAME
tcrm.inxx.top
SERVER_PORT
80
SERVER_ADDR
172.16.166.122
REMOTE_PORT
46836
REMOTE_ADDR
34.238.138.162
SERVER_SOFTWARE
nginx/1.6.2
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/home/wwwroot/tcrm/public
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
FCGI_ROLE
RESPONDER
PHP_SELF
REQUEST_TIME_FLOAT
1711617279.2527
REQUEST_TIME
1711617279
Environment Variables
empty

ThinkPHP Constants

APP_DEBUG
true
CMF_ROOT
/home/wwwroot/tcrm/public/../
APP_PATH
/home/wwwroot/tcrm/public/../app/
CMF_PATH
/home/wwwroot/tcrm/public/../simplewind/cmf/
PLUGINS_PATH
/home/wwwroot/tcrm/public/plugins/
EXTEND_PATH
/home/wwwroot/tcrm/public/../simplewind/extend/
VENDOR_PATH
/home/wwwroot/tcrm/public/../simplewind/vendor/
RUNTIME_PATH
/home/wwwroot/tcrm/public/../data/runtime/
THINKCMF_VERSION
5.0.180123
THINK_VERSION
5.0.14
THINK_START_TIME
1711617279.2533
THINK_START_MEM
405096
EXT
.php
DS
/
THINK_PATH
/home/wwwroot/tcrm/simplewind/thinkphp/
LIB_PATH
/home/wwwroot/tcrm/simplewind/thinkphp/library/
CORE_PATH
/home/wwwroot/tcrm/simplewind/thinkphp/library/think/
TRAIT_PATH
/home/wwwroot/tcrm/simplewind/thinkphp/library/traits/
ROOT_PATH
/home/wwwroot/tcrm/
LOG_PATH
/home/wwwroot/tcrm/public/../data/runtime/log/
CACHE_PATH
/home/wwwroot/tcrm/public/../data/runtime/cache/
TEMP_PATH
/home/wwwroot/tcrm/public/../data/runtime/temp/
CONF_PATH
/home/wwwroot/tcrm/public/../app/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
HTMLPURIFIER_PREFIX
/home/wwwroot/tcrm/simplewind/vendor/ezyang/htmlpurifier/library
QINIU_FUNCTIONS_VERSION
7.2.1