聯(lián)系官方銷售客服
1835022288
028-61286886
搜索帶表情符號的內容時,會出現(xiàn)以下的錯誤:
Illegal mix of collations for operation 'UNION'
Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation 'like'
解決方案:
mysql數(shù)據(jù)庫的字符集需要改成:utf8mb4_general_ci
操作步驟
1、使用phpmyadmin工具,選擇當前的數(shù)據(jù)庫
2、然后一下圖的選項,點執(zhí)行
這樣就把格式批量轉換了。
3、打開數(shù)據(jù)庫配置文件config/database.php
加上以下參數(shù)
'charset' => 'utf8mb4', 'DBCollat' => 'utf8mb4_general_ci',
-----------------------------------阿里云虛擬主機設置方法-------------------------------