[1045] PDOException in Connection.php line 293

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

  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:dbname=;host=1...', 'root', '', [0, 2, 0, ...]) in Connection.php line 293
  3. at Connection->connect() in Connection.php line 968
  4. at Connection->initConnect(false) in Mysql.php line 54
  5. at Mysql->getFields('firm') in Query.php line 1739
  6. at Query->getTableInfo('firm', 'pk') in Query.php line 1773
  7. at Query->getPk(['table' => 'firm', 'where' => [], 'field' => '*', ...]) in Query.php line 2428
  8. at Query->find(1) in Common.php line 23
  9. at Common->_initialize() in Controller.php line 56
  10. at Controller->__construct(object(Request))
  11. at ReflectionClass->newInstanceArgs([object(Request)]) in App.php line 215
  12. at App::invokeClass('app\index\controller...') in Loader.php line 420
  13. at Loader::controller('index', 'controller', false, 'Error') in App.php line 390
  14. at App::module(['', null, null], ['app_debug' => true, 'app_trace' => false, 'app_status' => '', ...], null) in App.php line 295
  15. at App::exec(['type' => 'module', 'module' => ['', null, null]], ['app_debug' => true, 'app_trace' => false, 'app_status' => '', ...]) in App.php line 123
  16. at App::run() in start.php line 18
  17. at require('/www/wwwroot/yzjdk.5...') in index.php line 62

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
FCGI_ROLE
RESPONDER
SCRIPT_FILENAME
/www/wwwroot/yzjdk.5groot.com/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/yzjdk.5groot.com/public
SERVER_PROTOCOL
HTTP/2.0
REQUEST_SCHEME
https
HTTPS
on
GATEWAY_INTERFACE
CGI/1.1
SERVER_SOFTWARE
nginx/1.20.2
REMOTE_ADDR
60.28.200.132
REMOTE_PORT
51033
SERVER_ADDR
172.17.0.11
SERVER_PORT
443
SERVER_NAME
yzjdk.5groot.com
REDIRECT_STATUS
200
PATH_INFO
HTTP_HOST
yzjdk.5groot.com
HTTP_SEC_CH_UA
"Google Chrome";v="131", "Chromium";v="131", "Not_A Brand";v="24"
HTTP_SEC_CH_UA_MOBILE
?0
HTTP_SEC_CH_UA_PLATFORM
"Windows"
HTTP_UPGRADE_INSECURE_REQUESTS
1
HTTP_USER_AGENT
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
HTTP_ACCEPT
text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
HTTP_SEC_FETCH_SITE
none
HTTP_SEC_FETCH_MODE
navigate
HTTP_SEC_FETCH_USER
?1
HTTP_SEC_FETCH_DEST
document
HTTP_ACCEPT_ENCODING
gzip, deflate, br, zstd
HTTP_ACCEPT_LANGUAGE
en-US,en;q=0.9
HTTP_PRIORITY
u=0, i
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1733537896.5429
REQUEST_TIME
1733537896
Environment Variables
empty

ThinkPHP Constants

SERVER_URL
yzjdk.5groot.com
APP_PATH
/www/wwwroot/yzjdk.5groot.com/public/../jdk_yzjdk/
THINK_VERSION
5.0.9
THINK_START_TIME
1733537896.5434
THINK_START_MEM
269192
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/yzjdk.5groot.com/thinkphp/
LIB_PATH
/www/wwwroot/yzjdk.5groot.com/thinkphp/library/
CORE_PATH
/www/wwwroot/yzjdk.5groot.com/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/yzjdk.5groot.com/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/yzjdk.5groot.com/
EXTEND_PATH
/www/wwwroot/yzjdk.5groot.com/extend/
VENDOR_PATH
/www/wwwroot/yzjdk.5groot.com/vendor/
RUNTIME_PATH
/www/wwwroot/yzjdk.5groot.com/runtime/
LOG_PATH
/www/wwwroot/yzjdk.5groot.com/runtime/log/
CACHE_PATH
/www/wwwroot/yzjdk.5groot.com/runtime/cache/
TEMP_PATH
/www/wwwroot/yzjdk.5groot.com/runtime/temp/
CONF_PATH
/www/wwwroot/yzjdk.5groot.com/public/../jdk_yzjdk/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
url
/
ref
ent
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
site
http://wap.few82.com/
road
?road=yzjdk.5groot.com/
memes
?road=yzjdk.5groot.com/&referer=
regs
@BaiduSpider|Sogou|Yisou|Haosou|360Spider@i
mobile
/phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone/
area
false
System Error

[0] HttpException in App.php line 360

模块不存在:ben

  1. // 模块初始化
  2. if ($module && $available) {
  3. // 初始化模块
  4. $request->module($module);
  5. $config = self::init($module);
  6. // 模块请求缓存检查
  7. $request->cache($config['request_cache'], $config['request_cache_expire'], $config['request_cache_except']);
  8. } else {
  9. throw new HttpException(404, 'module not exists:' . $module);
  10. }
  11. } else {
  12. // 单一模块部署
  13. $module = '';
  14. $request->module($module);
  15. }
  16. // 当前模块路径
  17. App::$modulePath = APP_PATH . ($module ? $module . DS : '');

Call Stack

  1. in App.php line 360
  2. at App::module(['ben', 's=', 'news'], ['app_debug' => true, 'app_trace' => false, 'app_status' => '', ...], null) in App.php line 295
  3. at App::exec(['type' => 'module', 'module' => ['ben', 's=', 'news']], ['app_debug' => true, 'app_trace' => false, 'app_status' => '', ...]) in App.php line 123
  4. at App::run() in start.php line 18
  5. at require('/www/wwwroot/yzjdk.5...') in index.php line 62

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
FCGI_ROLE
RESPONDER
SCRIPT_FILENAME
/www/wwwroot/yzjdk.5groot.com/public/index.php
QUERY_STRING
s=/ben/s=/news/article/detail/id/wap1782584.ppt.shtml
REQUEST_METHOD
GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME
/index.php
REQUEST_URI
/ben/s=/news/article/detail/id/wap1782584.ppt.shtml
DOCUMENT_URI
/index.php
DOCUMENT_ROOT
/www/wwwroot/yzjdk.5groot.com/public
SERVER_PROTOCOL
HTTP/1.1
REQUEST_SCHEME
http
GATEWAY_INTERFACE
CGI/1.1
SERVER_SOFTWARE
nginx/1.20.2
REMOTE_ADDR
3.145.91.152
REMOTE_PORT
3608
SERVER_ADDR
172.17.0.11
SERVER_PORT
80
SERVER_NAME
yzjdk.5groot.com
REDIRECT_STATUS
200
PATH_INFO
/ben/s=/news/article/detail/id/wap1782584.ppt.shtml
HTTP_ACCEPT
*/*
HTTP_USER_AGENT
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HTTP_ACCEPT_ENCODING
gzip, br, zstd, deflate
HTTP_HOST
shlh.5groot.com
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1733588137.3463
REQUEST_TIME
1733588137
Environment Variables
empty

ThinkPHP Constants

SERVER_URL
shlh.5groot.com
APP_PATH
/www/wwwroot/yzjdk.5groot.com/public/../jdk_shlh/
THINK_VERSION
5.0.9
THINK_START_TIME
1733588137.347
THINK_START_MEM
263104
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/yzjdk.5groot.com/thinkphp/
LIB_PATH
/www/wwwroot/yzjdk.5groot.com/thinkphp/library/
CORE_PATH
/www/wwwroot/yzjdk.5groot.com/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/yzjdk.5groot.com/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/yzjdk.5groot.com/
EXTEND_PATH
/www/wwwroot/yzjdk.5groot.com/extend/
VENDOR_PATH
/www/wwwroot/yzjdk.5groot.com/vendor/
RUNTIME_PATH
/www/wwwroot/yzjdk.5groot.com/runtime/
LOG_PATH
/www/wwwroot/yzjdk.5groot.com/runtime/log/
CACHE_PATH
/www/wwwroot/yzjdk.5groot.com/runtime/cache/
TEMP_PATH
/www/wwwroot/yzjdk.5groot.com/runtime/temp/
CONF_PATH
/www/wwwroot/yzjdk.5groot.com/public/../jdk_shlh/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false