1. 程式人生 > >mysql 設定預設編碼

mysql 設定預設編碼

可使用mysql命令設定:

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;

修改一有資料庫的編碼

alter database app_relation character set utf8;