[2003] PDOException in Connection.php line 295

SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'hdm7051926.my3w.com' (4)

  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=hdm705192...', 'hdm7051926', 'Edfacea1161b', [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 `s...', [], false, true) in Mysql.php line 65
  6. at Mysql->getFields('site_site') in Query.php line 1921
  7. at Query->getTableInfo('site_site', 'pk') in Query.php line 1955
  8. at Query->getPk(['multi' => ['AND' => ['site_lang' => [['eq', 'Cn']]]], 'where' => ['AND' => ['site_lang' => ['eq', 'Cn']]], 'table' => 'site_site', ...]) in Query.php line 2639
  9. at Query->find() in CommonController.php line 14
  10. at CommonController->_initialize() in Controller.php line 59
  11. at Controller->__construct(object(Request))
  12. at ReflectionClass->newInstanceArgs([object(Request)]) in App.php line 359
  13. at App::invokeClass('app\index\controller...') in Loader.php line 479
  14. at Loader::controller('Cn', 'controller', true, 'Error') in App.php line 581
  15. at App::module(['index', 'Cn', 'news'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 457
  16. at App::exec(['type' => 'module', 'module' => ['index', 'Cn', 'news'], 'convert' => false], ['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('/usr/home/wh-ah4zqgw...') in index.php line 22

Environment Variables

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

Server/Request Data

DOCUMENT_ROOT
/usr/home/wh-ah4zqgwphnyj7nx6y71/htdocs
GATEWAY_INTERFACE
CGI/1.1
HTTP_ACCEPT
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_ENCODING
br,gzip
HTTP_ACCEPT_LANGUAGE
en-US,en;q=0.5
HTTP_CONNECTION
close
HTTP_HOST
www.hzfybaoli.com
HTTP_IF_MODIFIED_SINCE
Fri, 13 Sep 2024 12:15:42 GMT
HTTP_REMOTE_HOST
18.97.9.175
HTTP_USER_AGENT
CCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_X_FORWARDED_FOR
18.97.9.175
HTTP_X_FORWARDED_PROTO
http
HTTP_X_REAL_IP
18.97.9.175
PATH
/bin
PHPRC
/var/www/php56/hichina_ini/wh-ah4zqgwphnyj7nx6y71
QUERY_STRING
REDIRECT_DOCUMENT_ROOT
/usr/home/wh-ah4zqgwphnyj7nx6y71/htdocs
REDIRECT_GATEWAY_INTERFACE
CGI/1.1
REDIRECT_HTTP_ACCEPT
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
REDIRECT_HTTP_ACCEPT_ENCODING
br,gzip
REDIRECT_HTTP_ACCEPT_LANGUAGE
en-US,en;q=0.5
REDIRECT_HTTP_CONNECTION
close
REDIRECT_HTTP_HOST
www.hzfybaoli.com
REDIRECT_HTTP_IF_MODIFIED_SINCE
Fri, 13 Sep 2024 12:15:42 GMT
REDIRECT_HTTP_REMOTE_HOST
18.97.9.175
REDIRECT_HTTP_USER_AGENT
CCBot/2.0 (https://commoncrawl.org/faq/)
REDIRECT_HTTP_X_FORWARDED_FOR
18.97.9.175
REDIRECT_HTTP_X_FORWARDED_PROTO
http
REDIRECT_HTTP_X_REAL_IP
18.97.9.175
REDIRECT_PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
REDIRECT_PATH_INFO
news/details-bxgjmzzgyjyj-218.html
REDIRECT_PATH_TRANSLATED
redirect:/index.php
REDIRECT_QUERY_STRING
REDIRECT_REMOTE_ADDR
10.0.0.97
REDIRECT_REMOTE_PORT
44264
REDIRECT_REQUEST_METHOD
GET
REDIRECT_REQUEST_URI
/news/details-bxgjmzzgyjyj-218.html
REDIRECT_SCRIPT_FILENAME
/usr/home/wh-ah4zqgwphnyj7nx6y71/htdocs/news
REDIRECT_SCRIPT_NAME
/news
REDIRECT_SERVER_ADDR
10.0.15.155
REDIRECT_SERVER_ADMIN
webmaster@wh-ah4zqgwphnyj7nx6y71.my3w.com
REDIRECT_SERVER_NAME
www.hzfybaoli.com
REDIRECT_SERVER_PORT
80
REDIRECT_SERVER_PROTOCOL
HTTP/1.0
REDIRECT_SERVER_SIGNATURE
REDIRECT_SERVER_SOFTWARE
Apache
REDIRECT_STATUS
200
REDIRECT_TZ
Asia/Shanghai
REDIRECT_UNIQUE_ID
Z1mNjAoAD5sACCclIOwAAAAD
REDIRECT_URL
/news/details-bxgjmzzgyjyj-218.html
REMOTE_ADDR
10.0.0.97
REMOTE_PORT
44264
REQUEST_METHOD
GET
REQUEST_URI
/news/details-bxgjmzzgyjyj-218.html
SCRIPT_FILENAME
/usr/home/wh-ah4zqgwphnyj7nx6y71/htdocs/index.php
SCRIPT_NAME
/index.php
SERVER_ADDR
10.0.15.155
SERVER_ADMIN
webmaster@wh-ah4zqgwphnyj7nx6y71.my3w.com
SERVER_NAME
www.hzfybaoli.com
SERVER_PORT
80
SERVER_PROTOCOL
HTTP/1.0
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache
TZ
Asia/Shanghai
UNIQUE_ID
Z1mNjAoAD5sACCclIOwAAAAD
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1733922188.8787
REQUEST_TIME
1733922188
PATH_INFO
news/details-bxgjmzzgyjyj-218.html
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/usr/home/wh-ah4zqgwphnyj7nx6y71/htdocs/application/
THINK_VERSION
5.0.24
THINK_START_TIME
1733922188.8797
THINK_START_MEM
226952
EXT
.php
DS
/
THINK_PATH
/usr/home/wh-ah4zqgwphnyj7nx6y71/htdocs/thinkphp/
LIB_PATH
/usr/home/wh-ah4zqgwphnyj7nx6y71/htdocs/thinkphp/library/
CORE_PATH
/usr/home/wh-ah4zqgwphnyj7nx6y71/htdocs/thinkphp/library/think/
TRAIT_PATH
/usr/home/wh-ah4zqgwphnyj7nx6y71/htdocs/thinkphp/library/traits/
ROOT_PATH
/usr/home/wh-ah4zqgwphnyj7nx6y71/htdocs/
EXTEND_PATH
/usr/home/wh-ah4zqgwphnyj7nx6y71/htdocs/extend/
VENDOR_PATH
/usr/home/wh-ah4zqgwphnyj7nx6y71/htdocs/vendor/
RUNTIME_PATH
/usr/home/wh-ah4zqgwphnyj7nx6y71/htdocs/runtime/
LOG_PATH
/usr/home/wh-ah4zqgwphnyj7nx6y71/htdocs/runtime/log/
CACHE_PATH
/usr/home/wh-ah4zqgwphnyj7nx6y71/htdocs/runtime/cache/
TEMP_PATH
/usr/home/wh-ah4zqgwphnyj7nx6y71/htdocs/runtime/temp/
CONF_PATH
/usr/home/wh-ah4zqgwphnyj7nx6y71/htdocs/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
ADDON_PATH
/usr/home/wh-ah4zqgwphnyj7nx6y71/htdocs/addons/