mysql 字符集设置

  1. 查看修改数据库字符集编码
    mysql> show variables like "char%";  
    mysql> show variables like "collation%";  
    mysql> set character_set_server=utf8;  
    mysql> set collation_server=utf8_general_ci; 
    
  2. 修改数据表字符集编码
    mysql> alter table xxx default character set utf8 collate utf8_general_ci;
    

你可能感兴趣的:(mysql 字符集设置)