[1045] PDOException in Connection.php line 528

SQLSTATE[HY000] [1045] Access denied for user 'b2c'@'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...', 'b2c', 'EdPxcdYHA8LwHx6W', [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 `b...', [], false, true) in Mysql.php line 90
  6. at Mysql->getFields('`b2c_u_help_cate`') in Connection.php line 377
  7. at Connection->getTableInfo('b2c_u_help_cate', 'bind') in Connection.php line 454
  8. at Connection->getFieldsBind('b2c_u_help_cate') in Builder.php line 292
  9. at Builder->buildWhere(object(Query), ['AND' => [['status', '=', 1], ['delete_time', '=', 0]]]) in Builder.php line 264
  10. at Builder->parseWhere(object(Query), ['AND' => [['status', '=', 1], ['delete_time', '=', 0]]]) 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 Help.php line 60
  14. at Help->center(object(Request))
  15. at ReflectionMethod->invokeArgs(object(Help), [object(Request)]) in Container.php line 395
  16. at Container->invokeReflectMethod(object(Help), object(ReflectionMethod), ['cate_id' => '36', 'convert' => false]) in Module.php line 131
  17. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  18. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  19. at Middleware->think\{closure}(object(Request))
  20. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  21. at Middleware->dispatch(object(Request), 'controller') in Module.php line 136
  22. at Module->exec() in Dispatch.php line 168
  23. at Dispatch->run() in App.php line 432
  24. at App->think\{closure}(object(Request), object(Closure), null)
  25. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  26. at Middleware->think\{closure}(object(Request)) in CrossMiddleware.php line 42
  27. at CrossMiddleware->handle(object(Request), object(Closure), null)
  28. at call_user_func_array([object(CrossMiddleware), 'handle'], [object(Request), object(Closure), null]) in Middleware.php line 185
  29. at Middleware->think\{closure}(object(Request))
  30. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  31. at Middleware->dispatch(object(Request)) in App.php line 435
  32. at App->run() in index.php line 42

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookies
fullyeetally_shop cb5fd4d4d2117f6413dbd221214f728f
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
HTTP_HOST www.2cshop.cn
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME www.2cshop.cn
SERVER_PORT 443
SERVER_ADDR 10.13.59.50
REMOTE_PORT 45588
REMOTE_ADDR 174.129.59.198
SERVER_SOFTWARE nginx/1.18.0
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/2.0
DOCUMENT_ROOT /www/wwwroot/B2CPublic/public
DOCUMENT_URI /index.php
REQUEST_URI /help/cate_id/36.html
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/help/cate_id/36.html
SCRIPT_FILENAME /www/wwwroot/B2CPublic/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711623689.4332
REQUEST_TIME 1711623689
Environment Variablesempty
ThinkPHP Constants
FILTER_VALIDATE_BOOL 258
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