[2002] PDOException in Connection.php line 293

SQLSTATE[HY000] [2002] No such file or directory

  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=jiuye;h...', 'root', '84eb33990dd927fe', [0, 2, 0, ...]) in Connection.php line 293
  3. at Connection->connect() in Connection.php line 969
  4. at Connection->initConnect(false) in Connection.php line 346
  5. at Connection->query('SHOW COLUMNS FROM `j...', [], false, true) in Mysql.php line 62
  6. at Mysql->getFields('jyxh_category') in Query.php line 1741
  7. at Query->getTableInfo('jyxh_category', 'type') in Query.php line 1789
  8. at Query->getFieldsType('jyxh_category') in Query.php line 1795
  9. at Query->getFieldsBind('jyxh_category') in Builder.php line 256
  10. at Builder->buildWhere(['AND' => ['is_nav' => ['=', 1, null], 'status' => ['=', 1, null], 'delete' => ['=', 0, null]]], ['multi' => ['AND' => ['is_nav' => [['=', 1, null]], 'status' => [['=', 1, null]], 'delete' => [['=', 0, null]]]], 'where' => ['AND' => ['is_nav' => ['=', 1, null], 'status' => ['=', 1, null], 'delete' => ['=', 0, null]]], 'table' => 'jyxh_category', ...]) in Builder.php line 226
  11. at Builder->parseWhere(['AND' => ['is_nav' => ['=', 1, null], 'status' => ['=', 1, null], 'delete' => ['=', 0, null]]], ['multi' => ['AND' => ['is_nav' => [['=', 1, null]], 'status' => [['=', 1, null]], 'delete' => [['=', 0, null]]]], 'where' => ['AND' => ['is_nav' => ['=', 1, null], 'status' => ['=', 1, null], 'delete' => ['=', 0, null]]], 'table' => 'jyxh_category', ...]) in Builder.php line 690
  12. at Builder->select(['multi' => ['AND' => ['is_nav' => [['=', 1, null]], 'status' => [['=', 1, null]], 'delete' => [['=', 0, null]]]], 'where' => ['AND' => ['is_nav' => ['=', 1, null], 'status' => ['=', 1, null], 'delete' => ['=', 0, null]]], 'table' => 'jyxh_category', ...]) in Query.php line 2308
  13. at Query->select() in Common.php line 15
  14. at Common->_initialize() in Controller.php line 57
  15. at Controller->__construct(object(Request))
  16. at ReflectionClass->newInstanceArgs([object(Request)]) in App.php line 216
  17. at App::invokeClass('app\index\controller...') in Loader.php line 420
  18. at Loader::controller('article', 'controller', false, 'Error') in App.php line 388
  19. at App::module([null, 'article', 'index'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 296
  20. at App::exec(['type' => 'module', 'module' => [null, 'article', 'index'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 124
  21. at App::run() in start.php line 18
  22. at require('/www/wwwroot/www.jxt...') in index.php line 19

Environment Variables

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

Server/Request Data

USER
www
HOME
/alidata/www
FCGI_ROLE
RESPONDER
SCRIPT_FILENAME
/www/wwwroot/www.jxtx.com/jyxh.mgtvshop.com.back/public/index.php
QUERY_STRING
s=a/232
REQUEST_METHOD
GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME
/index.php
REQUEST_URI
/a/232
DOCUMENT_URI
/index.php
DOCUMENT_ROOT
/www/wwwroot/www.jxtx.com/jyxh.mgtvshop.com.back/public
SERVER_PROTOCOL
HTTP/1.1
REQUEST_SCHEME
http
GATEWAY_INTERFACE
CGI/1.1
SERVER_SOFTWARE
nginx/1.14.0
REMOTE_ADDR
154.84.79.136
REMOTE_PORT
20000
SERVER_ADDR
172.19.211.205
SERVER_PORT
80
SERVER_NAME
jyxh.mgtvshop.com
REDIRECT_STATUS
200
PATH_INFO
a/232
HTTP_USER_AGENT
Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)
HTTP_HOST
www.hnjyxh.com
HTTP_ACCEPT
*/*
HTTP_ACCEPT_ENCODING
deflate, gzip
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1563686205.7404
REQUEST_TIME
1563686205
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/www.jxtx.com/jyxh.mgtvshop.com.back/public/../application/
PUBLIC_URL
/
THINK_VERSION
5.0.11
THINK_START_TIME
1563686205.8209
THINK_START_MEM
260960
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/www.jxtx.com/jyxh.mgtvshop.com.back/thinkphp/
LIB_PATH
/www/wwwroot/www.jxtx.com/jyxh.mgtvshop.com.back/thinkphp/library/
CORE_PATH
/www/wwwroot/www.jxtx.com/jyxh.mgtvshop.com.back/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/www.jxtx.com/jyxh.mgtvshop.com.back/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/www.jxtx.com/jyxh.mgtvshop.com.back/
EXTEND_PATH
/www/wwwroot/www.jxtx.com/jyxh.mgtvshop.com.back/extend/
VENDOR_PATH
/www/wwwroot/www.jxtx.com/jyxh.mgtvshop.com.back/vendor/
RUNTIME_PATH
/www/wwwroot/www.jxtx.com/jyxh.mgtvshop.com.back/runtime/
LOG_PATH
/www/wwwroot/www.jxtx.com/jyxh.mgtvshop.com.back/runtime/log/
CACHE_PATH
/www/wwwroot/www.jxtx.com/jyxh.mgtvshop.com.back/runtime/cache/
TEMP_PATH
/www/wwwroot/www.jxtx.com/jyxh.mgtvshop.com.back/runtime/temp/
CONF_PATH
/www/wwwroot/www.jxtx.com/jyxh.mgtvshop.com.back/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false