分类: Mysql/postgreSQL
2008-12-09 14:55:45
SET [GLOBAL] character_set_client = utf8; SET [GLOBAL] character_set_connection = utf8; SET [GLOBAL] character_set_database = utf8; SET [GLOBAL] character_set_results = utf8; SET [GLOBAL] character_set_server = utf8;
方法2、 也用SET语法,只对本次会话有效
SET NAMES 'utf8';
方法3、) 直接修改 my.cnf,增加一行内容,然后重启 MySQL,使之全局生效
default-character-set = utf8