2017-02-17 66 views
0

我們在MySQL 5.6.30-76.3-log中工作。 MySQL的系統變量有UTF8集:如何在Mysql觸發器中將字符集客戶端和整理連接從latin1更改爲utf8

SHOW VARIABLES WHERE Variable_name LIKE 'character\_set\_%' OR Variable_name LIKE 'collation%' : 
+--------------------------+-----------------+ 
| Variable_name   | Value   | 
+--------------------------+-----------------+ 
| character_set_client  | utf8   | 
| character_set_connection | utf8   | 
| character_set_database | utf8   | 
| character_set_filesystem | binary   | 
| character_set_results | utf8   | 
| character_set_server  | utf8   | 
| character_set_system  | utf8   | 
| collation_connection  | utf8_general_ci | 
| collation_database  | utf8_unicode_ci | 
| collation_server   | utf8_unicode_ci | 
+--------------------------+-----------------+

但在Python 2.7.6腳本創建觸發器,當我看到另一個字符集此觸發器: character_set_client字符LATIN1 collat​​ion_connection是latin1_swedish_ci database_collat​​ion utf8_unicode_ci

請指點如何在觸發器定義中將character_set_client,collat​​ion_connection更改爲utf8。

回答

相關問題