Czech sorting installation




Correct czech sorting (included "ch") in mySQL is set using --default-character-set=czech directive on mysqld daemon command line, e.g. in /etc/rc.d/init.d/mysql file. After restarting was impossible connect to server. Problem is in changed code page - old indexes were created with different code page. Solution: recreate whole database:
  1. export data, mysqldump --all-databases --add-drop-table > /tmp/mydump.dmp
  2. import data, mysql < /tmp/mydump.dmp

Mysqld normally need mysql database when starting, otherwise cannot start. To overcome use parameter --skip-grant-tables or mysql_install_db utility. Here is necessary add parameter --default-character-set=czech to create correct indexes.