[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_cross_college...') in Connection.php line 377
  7. at Connection->getTableInfo('b2c_u_cross_college_...', 'bind') in Connection.php line 454
  8. at Connection->getFieldsBind('b2c_u_cross_college_...') in Builder.php line 292
  9. at Builder->buildWhere(object(Query), ['AND' => [['', 'exp', object(Expression)], ['status', '=', 1], ['delete_time', '=', 0]]]) in Builder.php line 264
  10. at Builder->parseWhere(object(Query), ['AND' => [['', 'exp', object(Expression)], ['status', '=', 1], ['delete_time', '=', 0]]]) in Builder.php line 998
  11. at Builder->select(object(Query)) in Connection.php line 1281
  12. at Connection->value(object(Query), ['COUNT(*) AS tp_count'], 0, false) in Connection.php line 1327
  13. at Connection->aggregate(object(Query), 'COUNT', 'COUNT(*) AS tp_count') in Query.php line 643
  14. at Query->aggregate('COUNT', '*', true) in Query.php line 678
  15. at Query->count() in Query.php line 1804
  16. at Query->paginate(6, false) in Academy.php line 287
  17. at Academy->getMoreVideo() in Academy.php line 236
  18. at Academy->moreVideo()
  19. at ReflectionMethod->invokeArgs(object(Academy), []) in Container.php line 395
  20. at Container->invokeReflectMethod(object(Academy), object(ReflectionMethod), ['cate_id' => '17', 'convert' => false]) in Module.php line 131
  21. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  22. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  23. at Middleware->think\{closure}(object(Request))
  24. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  25. at Middleware->dispatch(object(Request), 'controller') in Module.php line 136
  26. at Module->exec() in Dispatch.php line 168
  27. at Dispatch->run() in App.php line 432
  28. at App->think\{closure}(object(Request), object(Closure), null)
  29. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  30. at Middleware->think\{closure}(object(Request)) in CrossMiddleware.php line 42
  31. at CrossMiddleware->handle(object(Request), object(Closure), null)
  32. at call_user_func_array([object(CrossMiddleware), 'handle'], [object(Request), object(Closure), null]) in Middleware.php line 185
  33. at Middleware->think\{closure}(object(Request))
  34. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  35. at Middleware->dispatch(object(Request)) in App.php line 435
  36. at App->run() in index.php line 42

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookies
fullyeetally_shop d2d5a6d4cd45f0ea976f5541bc3d53d4
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 59076
REMOTE_ADDR 44.215.110.142
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 /class/cate_id/17.html
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/class/cate_id/17.html
SCRIPT_FILENAME /www/wwwroot/B2CPublic/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711623175.2968
REQUEST_TIME 1711623175
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