當(dāng)向 MySQL 數(shù)據(jù)庫插入一條帶有中文的數(shù)據(jù)形如 insert into employee values(null,'張三','female','1995-10-08','2015-11-12','Sales',2000,'是個好員工!')
; 出現(xiàn)亂碼時,可以使用語句 show variables like 'character%'
; 來查看當(dāng)前數(shù)據(jù)庫的相關(guān)編碼集。
從上圖中可以看到 MySQL 有六處使用了字符集,分別為:client 、connection、database、results、server 、system。其中與服務(wù)器端相關(guān):database、server、system(永遠(yuǎn)無法修改,就是utf-8);與客戶端相關(guān):connection、client、results 。
client
學(xué)習(xí)交流
熱門圖片
猜你喜歡的新聞
猜你喜歡的關(guān)注
新聞熱點(diǎn) 2024-06-26 22:28:41
2024-06-26 22:26:16
2024-06-26 22:23:01
2024-06-25 19:29:23
2024-06-25 19:22:14
2024-06-25 19:19:15
疑難解答 圖片精選 |