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->li
nks[$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