[1045] PDOException in Connection.php line 295

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

  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 295
  2. at PDO->__construct('mysql:host=127.0.0.1...', 'yunadmin', 'XnjBbyZBhmN5fPb5', [0, 2, 0, ...]) in Connection.php line 295
  3. at Connection->connect() in Connection.php line 995
  4. at Connection->initConnect(false) in Connection.php line 348
  5. at Connection->query('SHOW COLUMNS FROM `f...', [], false, true) in Mysql.php line 65
  6. at Mysql->getFields('`fa_carrier_service_...') in Query.php line 1921
  7. at Query->getTableInfo('fa_carrier_service_t...', 'type') in Query.php line 1969
  8. at Query->getFieldsType('fa_carrier_service_t...') in Query.php line 1975
  9. at Query->getFieldsBind('fa_carrier_service_t...') in Builder.php line 270
  10. at Builder->buildWhere([], ['table' => 'fa_carrier_service_t...', 'order' => ['id' => 'desc'], 'where' => [], ...]) in Builder.php line 240
  11. at Builder->parseWhere([], ['table' => 'fa_carrier_service_t...', 'order' => ['id' => 'desc'], 'where' => [], ...]) in Builder.php line 719
  12. at Builder->select(['table' => 'fa_carrier_service_t...', 'order' => ['id' => 'desc'], 'where' => [], ...]) in Query.php line 2511
  13. at Query->select() in Index.php line 27
  14. at Index->index()
  15. at ReflectionMethod->invokeArgs(object(Index), []) in App.php line 343
  16. at App::invokeMethod([object(Index), 'index'], []) in App.php line 611
  17. at App::module(['', null, null], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], true) in App.php line 456
  18. at App::exec(['type' => 'module', 'module' => ['', null, null]], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  19. at App::run() in start.php line 19
  20. at require('/www/wwwroot/yun/thi...') in index.php line 23

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
HTTP_HOST
hf.jinyuhangxin.com
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
PATH_INFO
REDIRECT_STATUS
200
SERVER_NAME
hf.jinyuhangxin.com
SERVER_PORT
80
SERVER_ADDR
10.0.8.10
REMOTE_PORT
58990
REMOTE_ADDR
3.92.96.247
SERVER_SOFTWARE
nginx/1.18.0
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/wwwroot/yun/public
DOCUMENT_URI
/index.php
REQUEST_URI
/
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
SCRIPT_FILENAME
/www/wwwroot/yun/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711665579.4371
REQUEST_TIME
1711665579
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/yun/public/../application/
THINK_VERSION
5.0.24
THINK_START_TIME
1711665579.4373
THINK_START_MEM
395056
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/yun/thinkphp/
LIB_PATH
/www/wwwroot/yun/thinkphp/library/
CORE_PATH
/www/wwwroot/yun/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/yun/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/yun/
EXTEND_PATH
/www/wwwroot/yun/extend/
VENDOR_PATH
/www/wwwroot/yun/vendor/
RUNTIME_PATH
/www/wwwroot/yun/runtime/
LOG_PATH
/www/wwwroot/yun/runtime/log/
CACHE_PATH
/www/wwwroot/yun/runtime/cache/
TEMP_PATH
/www/wwwroot/yun/runtime/temp/
CONF_PATH
/www/wwwroot/yun/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
FILTER_VALIDATE_BOOL
258
ADDON_PATH
/www/wwwroot/yun/addons/