mysql设置编码问题
2018-06-29 本文已影响2人
陆_志东
创建完数据库最后执行一遍下面所有的语句,数据库创建的时候最好指定utf-8,不然会出现想象不到的乱码问题
set character_set_client = utf8;
set character_set_server = utf8;
set character_set_connection = utf8;
set character_set_database = utf8;
set character_set_results = utf8;
set collation_connection = utf8_general_ci;
set collation_database = utf8_general_ci;
set collation_server = utf8_general_ci;