4 ms·
Why does MySQL still default to latin1? (Or am I mistaken?)
by happenstance 17y ago
Why does MySQL still default to latin1? (Or am I mistaken?)
- wvenable 17y agoBecause changing the defaults might mean a world of hurt for people not expecting it. You should just always be explicit.
- happenstance 17y ago> You should just always be explicit. I generally agree. Note: I think if you leave out any specific encoding configuration from your my.cnf, mysql implicitly goes with latin1. For users who are assuming a modern unicode/utf8 default setup, might be nice if the mysql folks would require an explicit config for this setting.
- ars 17y agoJust run: ALTER DATABASE database_name DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; And you don't have to worry about it for any new tables. (If you have existing ones, you'll have to change the table default, and possibly the column too.)