Wednesday, March 24, 2010

Mysql Unknown Variable character-set-server

If you've recently upgraded to MySQL 5.1.45, you might experience a problem running mysql client. The error message says:

/usr/bin/mysql: unknown variable 'character-set-server=utf8'

The reason is that mysql client no longer supports character-set-server parameter. Actually I don't know why, the official ChangeLog doesn't
include any explanations. The solution is to disable character-set-server option
inside /etc/mysql/my.cnf

[mysql]
character-sets-dir=/usr/share/mysql/charsets
#character-set-server=utf8