搜索
系统检测到您的用户名不符合规范:

5.0.23存储过程报SQLSTATE[HY000] [1042]

浏览:451 发布日期:2019年01月05日 分类:求助交流
5.0.23存储过程报SQLSTATE[HY000] [1042] ,增删改查全报,
环境apache24 php73 mysql56
链接数据库测试通过!
换用原生php增删改查均无问题!



以下是错误代码!
[1042] PDOException in Connection.php line 295
SQLSTATE[HY000] [1042] Can't get hostname for your address
$this->fetchType = $config['result_type'];
}
try {
if (empty($config['dsn'])) {
$config['dsn'] = $this->parseDsn($config);
}
if ($config['debug']) {
$startTime = microtime(true);
}
$this->links[$linkNum] = new PDO($config['dsn'], $config['username'], $config['password'], $params);
if ($config['debug']) {
// 记录数据库连接信息
Log::record('[ DB ] CONNECT:[ UseTime:' . number_format(microtime(true) - $startTime, 6) . 's ] ' . $config['dsn'], 'sql');
}
} catch (\PDOException $e) {
if ($autoConnection) {
Log::record($e->getMessage(), 'error');
return $this->connect($autoConnection, $linkNum);
} else {
Call Stack
in Connection.php line 295
at PDO->__construct('mysql:host=127.0.0.1...', 'root', '123456', [0, 2, 0, ...]) in Connection.php line 295
at Connection->connect() in Connection.php line 995
at Connection->initConnect(false) in Connection.php line 348
at Connection->query('SHOW COLUMNS FROM `s...', [], false, true) in Mysql.php line 65
at Mysql->getFields('`sy_manager`') in Query.php line 1921
at Query->getTableInfo('sy_manager', 'type') in Query.php line 1969
at Query->getFieldsType('sy_manager') in Query.php line 1975
at Query->getFieldsBind('sy_manager') in Builder.php line 270
at Builder->buildWhere([], ['table' => 'sy_manager', 'where' => [], 'field' => '*', ...]) in Builder.php line 240
at Builder->parseWhere([], ['table' => 'sy_manager', 'where' => [], 'field' => '*', ...]) in Builder.php line 719
at Builder->select(['table' => 'sy_manager', 'where' => [], 'field' => '*', ...]) in Query.php line 2511
at Query->select() in Index.php line 14
at Index->welcome()
at ReflectionMethod->invokeArgs(object(Index), []) in App.php line 343
at App::invokeMethod([object(Index), 'welcome'], []) in App.php line 611
at App::module(['syadmin', 'index', 'welcome'], ['app_host' => '', 'app_debug' => true, 'app_trace' => true, ...], true) in App.php line 456
at App::exec(['type' => 'module', 'module' => ['syadmin', 'index', 'welcome']], ['app_host' => '', 'app_debug' => true, 'app_trace' => true, ...]) in App.php line 139
at App::run() in start.php line 19
at require('F:\wwwroot\sy\thinkp...') in index.php line 17
最佳答案
评论() 相关
后面还有条评论,
评论支持使用[code][/code]标签添加代码
您需要登录后才可以评论 登录 | 立即注册
收藏
googol
积分:215 等级:LV1
热点推荐
(追記) (追記ここまで)
最新更新

我们

合作

网站

信息

ThinkPHP 是一个免费开源的,快速、简单的面向对象的 轻量级PHP开发框架 ,创立于2006年初,遵循Apache2开源协议发布,是为了敏捷WEB应用开发和简化企业应用开发而诞生的。ThinkPHP从诞生以来一直秉承简洁实用的设计原则,在保持出色的性能和至简的代码的同时,也注重易用性。并且拥有众多的原创功能和特性,在社区团队的积极参与下,在易用性、扩展性和性能方面不断优化和改进,已经成长为国内最领先和最具影响力的WEB应用开发框架,众多的典型案例确保可以稳定用于商业以及门户级的开发。

AltStyle によって変換されたページ (->オリジナル) /