1. 程式人生 > >mysql更改資料庫和表編碼

mysql更改資料庫和表編碼

第一步:檢視全域性編碼方式

show variables like ‘character%’;

第二步:設定全域性的編碼方式

set character_set_client = utf8;
set character_set_connection = utf8;
set character_set_database = utf8;
set character_set_filesystem = utf8;
set character_set_results = utf8;
set character_set_server = utf8;

mysql不支援在navicate中更改資料庫和表的編碼方式


alter table WF_JOBS DEFAULT CHARACTER SET utf8;
alter table BUNDLE_ACTIONS DEFAULT CHARACTER SET utf8;
alter table COORD_ACTIONS DEFAULT CHARACTER SET utf8;
alter table COORD_JOBS DEFAULT CHARACTER SET utf8;
alter table OOZIE_SYS DEFAULT CHARACTER SET utf8;
alter table OPENJPA_SEQUENCE_TABLE DEFAULT CHARACTER SET utf8;
alter table SLA_EVENTS DEFAULT CHARACTER SET utf8;
alter table SLA_REGISTRATION DEFAULT CHARACTER SET utf8;
alter table SLA_SUMMARY DEFAULT CHARACTER SET utf8;
alter table VALIDATE_CONN DEFAULT CHARACTER SET utf8;
alter table WF_ACTIONS DEFAULT CHARACTER SET utf8;