mysql設置字符集為utf8 mysql數(shù)據庫怎么在服務器查看數(shù)據庫字符集、服務器字符集、客戶端字符集、對應表字符集?
mysql數(shù)據庫怎么在服務器查看數(shù)據庫字符集、服務器字符集、客戶端字符集、對應表字符集?要查看mysql中的字符集,請先登錄mysql并執(zhí)行命令mysql> show variables like
mysql數(shù)據庫怎么在服務器查看數(shù)據庫字符集、服務器字符集、客戶端字符集、對應表字符集?
要查看mysql中的字符集,請先登錄mysql并執(zhí)行命令
mysql> show variables like%character%
查看mysql支持的字符集
mysql> show character set
查看數(shù)據庫的字符集
mysql> show database status from database name like table nameset character set
MySQL> create database abc default character set=utf8;
MySQL> create Table test1(id int(6),name char(10))default character set=“GBK”
修改庫的字符集
MySQL> alter database abc default character set GBK
修改表的字符集
MySQL> alter Tabletest1轉換為字符集utf8
修改字段的字符集
MySQL> alter table test1修改名稱字符(10)字符集GBK