[10501] PDOException in Connection.php line 385

SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (gbk_chinese_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation '='

  1. $this->PDOStatement->execute();
  2. // 调试结束
  3. $this->debug(false, '', $master);
  4. // 返回结果集
  5. return $this->getResult($pdo, $procedure);
  6. } catch (\PDOException $e) {
  7. if ($this->isBreak($e)) {
  8. return $this->close()->query($sql, $bind, $master, $pdo);
  9. }
  10. throw new PDOException($e, $this->config, $this->getLastsql());
  11. } catch (\Throwable $e) {
  12. if ($this->isBreak($e)) {
  13. return $this->close()->query($sql, $bind, $master, $pdo);
  14. }
  15. throw $e;
  16. } catch (\Exception $e) {
  17. if ($this->isBreak($e)) {
  18. return $this->close()->query($sql, $bind, $master, $pdo);
  19. }

Call Stack

  1. in Connection.php line 385
  2. at Connection->query('SELECT * FROM `51sai...', ['where_AND_classpath' => ['tag-ʮһ-0', 2]], false, false) in Query.php line 255
  3. at Query->query('SELECT * FROM `51sai...', ['where_AND_classpath' => ['tag-ʮһ-0', 2]], false, false) in Query.php line 2686
  4. at Query->find() in Index.php line 362
  5. at Index->column()
  6. at ReflectionMethod->invokeArgs(object(Index), []) in App.php line 343
  7. at App::invokeMethod([object(Index), 'column'], []) in App.php line 611
  8. at App::module(['index', 'index', 'column'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 456
  9. at App::exec(['type' => 'module', 'module' => ['index', 'index', 'column'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  10. at App::run() in start.php line 19
  11. at require('/www/wwwroot/fastadm...') in index.php line 19

Exception Datas

PDO Error Info
SQLSTATE HY000
Driver Error Code 1267
Driver Error Message Illegal mix of collations (gbk_chinese_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation '='
Database Status
Error Code 10501
Error Message SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (gbk_chinese_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation '='
Error SQL SELECT * FROM `51saier_enewsclass` WHERE `classpath` = 'tag-ʮһ-0' LIMIT 1
Database Config
type mysql
hostname 127.0.0.1
database 51saiercn_game
hostport
dsn
params []
charset utf8mb4
prefix 51saier_
debug false
deploy 0
rw_separate false
master_num 1
slave_no
read_master false
fields_strict true
result_type 2
resultset_type array
auto_timestamp false
datetime_format false
sql_explain false
builder
query \think\db\Query
break_reconnect false

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
HTTP_HOST
www.51saier.cn
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
PATH_INFO
/tag-ʮһ-0.html
REDIRECT_STATUS
200
SERVER_NAME
51saier.cn
SERVER_PORT
80
SERVER_ADDR
172.29.194.205
REMOTE_PORT
33942
REMOTE_ADDR
54.224.52.210
SERVER_SOFTWARE
nginx/1.22.1
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/wwwroot/fastadmin.51saier.cn_game/public
DOCUMENT_URI
/index.php
REQUEST_URI
/tag-%CA%AE%D2%BB-0.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/tag-%CA%AE%D2%BB-0.html
SCRIPT_FILENAME
/www/wwwroot/fastadmin.51saier.cn_game/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1710817964.2822
REQUEST_TIME
1710817964
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/fastadmin.51saier.cn_game/public/../application/
SITEMAPS
/www/wwwroot/fastadmin.51saier.cn_game/public/
THINK_VERSION
5.0.24
THINK_START_TIME
1710817964.2823
THINK_START_MEM
367368
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/fastadmin.51saier.cn_game/thinkphp/
LIB_PATH
/www/wwwroot/fastadmin.51saier.cn_game/thinkphp/library/
CORE_PATH
/www/wwwroot/fastadmin.51saier.cn_game/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/fastadmin.51saier.cn_game/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/fastadmin.51saier.cn_game/
EXTEND_PATH
/www/wwwroot/fastadmin.51saier.cn_game/extend/
VENDOR_PATH
/www/wwwroot/fastadmin.51saier.cn_game/vendor/
RUNTIME_PATH
/www/wwwroot/fastadmin.51saier.cn_game/runtime/
LOG_PATH
/www/wwwroot/fastadmin.51saier.cn_game/runtime/log/
CACHE_PATH
/www/wwwroot/fastadmin.51saier.cn_game/runtime/cache/
TEMP_PATH
/www/wwwroot/fastadmin.51saier.cn_game/runtime/temp/
CONF_PATH
/www/wwwroot/fastadmin.51saier.cn_game/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
FILTER_VALIDATE_BOOL
258
PHP_FLOAT_DIG
15
PHP_FLOAT_EPSILON
2.2204460492503E-16
PHP_FLOAT_MIN
2.2250738585072E-308
PHP_FLOAT_MAX
1.7976931348623E+308
PHP_OS_FAMILY
Linux
ADDON_PATH
/www/wwwroot/fastadmin.51saier.cn_game/addons/