查看以及修改mysql默认字符集的方法

来源:互联网 发布:医学网络教育 编辑:程序博客网 时间:2024/05/21 18:52

查看:

show variables like '%char%';  

修改:

  1. mysql> SET character_set_client = utf8 ;  
  2. mysql> SET character_set_connection = utf8 ;   
  3. mysql> SET character_set_database = utf8 ;   
  4. mysql> SET character_set_results = utf8 ;    
  5. mysql> SET character_set_server = utf8 ;   
  6.  
  7. mysql> SET collation_connection = utf8 ;  
  8. mysql> SET collation_database = utf8 ;   
  9. mysql> SET collation_server = utf8 ; 

原创粉丝点击