Menu Close

Category: Collation

Adding your own collation to MySQL

I’m the kind of DBA that prefers to keep everything simple, BUT, sometimes it’s not possible. Few days ago I’ve faced an issue where none of the collations shipped by default with MySQL would guarantee integrity of my database, and to avoid a massive re-write of application code, we have explored an option that up to the day, I didn’t know about. Add your own collation to MySQL. This option is described on this section of MySQL documentation . On this post I will show how to make MySQL identify volves with acute accent (fada) as a different letter: First, let’s find out where is our character-set folder: mysql [localhost] {msandbox} ((none)) > SHOW VARIABLES LIKE ‘character_sets_dir’; +——————–+—————————————+ | Variable_name | Value | +——————–+—————————————+ | character_sets_dir | /mysql/sources/5.6.26/share/charsets/ | +——————–+—————————————+ . . .

Liked? Help and Share!