查看字符集編碼
mysql> show variables like 'character%';
修改字符集編碼,方法如下
mysql> set character_set_database=utf8;
注意,有可能在修改之後仍然在寫入中文是報錯
1>重新啓動mysql
2>將原有的庫刪除,重新建庫
查看字符集編碼
mysql> show variables like 'character%';
修改字符集編碼,方法如下
mysql> set character_set_database=utf8;
注意,有可能在修改之後仍然在寫入中文是報錯
1>重新啓動mysql
2>將原有的庫刪除,重新建庫