2.数据库级别的字符集和校对规则
设置方法:建立库时:CREATE DATABASE db_name DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
修改库时:ALTER DATABASE db_name DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
3.表级别的字符集和校对规则
设置方法:
建表:CREATE TABLE tbl_name (column_list) [DEFAULT CHARACTER SET charset_name [COLLATE collation_name]]
改表:ALTER TABLE tbl_name [DEFAULT CHARACTER SET charset_name] [COLLATE collation_name]