新闻动态

返回
顶部
System Error

[1045] PDOException in Connection.php line 295

SQLSTATE[HY000] [1045] Access denied for user 'root'@'127.0.0.1' (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 295
  2. at PDO->__construct('mysql:host=127.0.0.1...', 'root', '', [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 `c...', [], false, true) in Mysql.php line 65
  6. at Mysql->getFields('`cms_archives`') in Query.php line 1921
  7. at Query->getTableInfo('cms_archives', 'pk') in Query.php line 1955
  8. at Query->getPk(['soft_delete' => ['__TABLE__.deletetime', ['null', '']], 'via' => '', 'with' => ['channel'], ...]) in Query.php line 2639
  9. at Query->find('115') in Model.php line 1707
  10. at Model::get('115', ['channel']) in Archives.php line 29
  11. at Archives->index()
  12. at call_user_func_array([object(Archives), 'index'], []) in Route.php line 76
  13. at Route->execute('cms', 'archives', 'index')
  14. at ReflectionMethod->invokeArgs(object(Route), ['cms', 'archives', 'index']) in App.php line 343
  15. at App::invokeMethod(['\think\addons\Route', 'execute'], ['diyname' => '115', 'addon' => 'cms', 'controller' => 'archives', ...]) in App.php line 470
  16. at App::exec(['type' => 'method', 'method' => ['\think\addons\Route', 'execute'], 'var' => ['addon' => 'cms', 'controller' => 'archives', 'action' => 'index']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  17. at App::run() in start.php line 19
  18. at require('/data/wwwroot/www/jt...') in index.php line 24

Environment Variables

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

Server/Request Data

TEMP
/tmp
TMPDIR
/tmp
TMP
/tmp
PATH
/usr/local/bin:/usr/bin:/bin
USER
www
HOME
/home/www
HTTP_ACCEPT_LANGUAGE
en-US,en;q=0.5
HTTP_ACCEPT
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT
CCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_CONNECTION
close
HTTP_X_FORWARDED_PROTO
http
HTTP_X_FORWARDED_FOR
3.236.253.192
HTTP_X_REAL_IP
3.236.253.192
HTTP_HOST
topshunhe.com
PATH_INFO
/a/115.html
REDIRECT_STATUS
200
SERVER_NAME
10.1.1.88
SERVER_PORT
8000
SERVER_ADDR
10.1.1.88
REMOTE_PORT
33886
REMOTE_ADDR
10.1.1.55
SERVER_SOFTWARE
nginx/1.18.0
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.0
DOCUMENT_ROOT
/data/wwwroot/www/jtwebsite/public
DOCUMENT_URI
/index.php
REQUEST_URI
/a/115.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/a/115.html
SCRIPT_FILENAME
/data/wwwroot/www/jtwebsite/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1634693933.8159
REQUEST_TIME
1634693933
Environment Variables
empty

ThinkPHP Constants

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