更改默认排序规则/字符集

时间:2013-05-02 13:54:51

标签: mysql my.cnf

我知道之前已经回答过,但我发现的解决方案并不适用于我的系统(我已经测试过了)。

我想更改Mysql中的默认排序规则。看来这是设置为latin1_swedish_ci,我想将其更改为UTF8_general_ci。

网上最常返回的解决方案是将default_character_set指令放在my.ini中,默认值为utf8,但由于某种原因,它会出错。

这是错误。我希望有人可以帮助我。

130502 15:45:17 [Note] Plugin 'FEDERATED' is disabled.
130502 15:45:17 InnoDB: The InnoDB memory heap is disabled
130502 15:45:17 InnoDB: Mutexes and rw_locks use Windows interlocked functions
130502 15:45:17 InnoDB: Compressed tables use zlib 1.2.3
130502 15:45:17 InnoDB: Initializing buffer pool, size = 128.0M
130502 15:45:17 InnoDB: Completed initialization of buffer pool
130502 15:45:17 InnoDB: highest supported file format is Barracuda.
130502 15:45:17  InnoDB: Waiting for the background threads to start
130502 15:45:18 InnoDB: 1.1.8 started; log sequence number 2472751
130502 15:45:18 [ERROR] wampmysqld: unknown variable 'default-character-set=utf8'
130502 15:45:18 [ERROR] Aborting

130502 15:45:18  InnoDB: Starting shutdown...
130502 15:45:19  InnoDB: Shutdown completed; log sequence number 2472751
130502 15:45:19 [Note] wampmysqld: Shutdown complete

1 个答案:

答案 0 :(得分:4)

尝试:

character-set-server = utf8
collation-server = utf8_general_ci