mysql 查詢新建表,怎樣設置mysql創建表格時默認的字符集?
通過mysql命令修改:修改數據庫的字符集mysql>usemydbmysql>alterdatabasemydbcharactersetutf-8;創建數據庫指定數據庫的字符集mysql>createdatabasemydbcharactersetutf-8;通過配置文件修改:修改/var/lib/mysql/mydb/db.optdefault-character-set=latin1default-collation=latin1_swedish_ci為default-character-set=utf8default-collation=utf8_general_ci重起MySQL: