[1045] PDOException in Connection.php line 528

SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)

  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...', 'root', 'JBSKcaEFX2tAaD6Z', [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 `c...', [], false, true) in Mysql.php line 90
  6. at Mysql->getFields('cmf_option') in Connection.php line 377
  7. at Connection->getTableInfo('cmf_option', 'bind') in Connection.php line 454
  8. at Connection->getFieldsBind('cmf_option') in Builder.php line 292
  9. at Builder->buildWhere(object(Query), ['AND' => [['option_name', '=', 'cdn_settings']]]) in Builder.php line 264
  10. at Builder->parseWhere(object(Query), ['AND' => [['option_name', '=', 'cdn_settings']]]) in Builder.php line 991
  11. at Builder->select(object(Query)) in Connection.php line 1281
  12. at Connection->value(object(Query), 'option_value', null) in Query.php line 594
  13. at Query->value('option_value') in common.php line 542
  14. at cmf_get_option('cdn_settings') in HomeBaseController.php line 43
  15. at HomeBaseController->_initializeView() in BaseController.php line 33
  16. at BaseController->__construct()
  17. at ReflectionClass->newInstanceArgs([]) in Container.php line 439
  18. at Container->invokeClass('app\index\controller...', []) in Container.php line 284
  19. at Container->make('app\index\controller...', true) in App.php line 782
  20. at App->controller('index', 'controller', 'Controller', 'Error') in Module.php line 95
  21. at Module->exec() in Dispatch.php line 168
  22. at Dispatch->run() in App.php line 475
  23. at App->think\{closure}(object(Request), object(Closure), null)
  24. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  25. at Middleware->think\{closure}(object(Request))
  26. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  27. at Middleware->dispatch(object(Request)) in App.php line 478
  28. at App->run() in index.php line 30

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
FCGI_ROLE RESPONDER
SCRIPT_FILENAME /www/wwwroot/blog/public/index.php
QUERY_STRING
REQUEST_METHOD GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME /index.php
REQUEST_URI /
DOCUMENT_URI /index.php
DOCUMENT_ROOT /www/wwwroot/blog/public
SERVER_PROTOCOL HTTP/1.1
REQUEST_SCHEME http
GATEWAY_INTERFACE CGI/1.1
SERVER_SOFTWARE nginx/1.18.0
REMOTE_ADDR 3.93.173.205
REMOTE_PORT 49782
SERVER_ADDR 172.26.232.71
SERVER_PORT 80
SERVER_NAME www.wuhequan.cn
REDIRECT_STATUS 200
PATH_INFO
HTTP_ACCEPT */*
HTTP_USER_AGENT claudebot
HTTP_HOST www.wuhequan.cn
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1710824562.3101
REQUEST_TIME 1710824562
Environment Variablesempty
ThinkPHP Constants
APP_DEBUG true
CMF_ROOT /www/wwwroot/blog/
APP_PATH /www/wwwroot/blog/app/
WEB_ROOT /www/wwwroot/blog/public/
HTMLPURIFIER_PREFIX /www/wwwroot/blog/vendor/ezyang/htmlpurifier/library
1.378387s