DAB MySQL deprecated --default-character-set fix

apmuthu

Member
Feb 26, 2009
744
3
18
Chennai - India & Singapore
For those building OpenVZ Templates with DAB and MySQL an analysis of the logs for MySQL v5.1+ will show:
The syntax '--default-character-set' is deprecated and will be removed in a future release. Please use --character-set-server instead.
http://bugs.mysql.com/bug.php?id=52047 lists the fix and and the CLI fix as well.

The Suggested fix and it's drawback:
I went to the config file "my.ini"
commented out: default-character-set=utf8
and added: character-set-server=utf8
rebooted

This fixed the warning - its gone.

BUT
now i can not connect via commandline:
c:\>mysql -uroot -p
enter password ****
Unknown Variable: character-set-server
c:\>
Adding the following too was okay:
added to [mysqld]
collation-server=utf8_general_ci
The real fix it seems is:
Apply the character-set-server=utf8 only in [mysqld] section and not in the [mysql] section of my.ini
The problem is fixed in MySQL v5.5 with a default install having in it's my.ini:
Code:
[mysql]...
default-character-set=utf8

[mysqld]...
character-set-server=utf8
Hope a future DAB may take this into account if there is anything it has to do with it.

View attachment MySQL Deprecated default-character-set Fix.pdf
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE and Proxmox Mail Gateway. We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!