Project

General

Profile

Actions

Patch #19742

closed

RedmineInstall: MySQL: collation_database

Patch #19742: RedmineInstall: MySQL: collation_database

Added by @ go2null over 11 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Documentation
Target version:
-

Description

Currently, the code sample creates a database with collation_database=utf8_general_ci. This potentially creates issues1 when sorting some unicode languages. A better approach would be to specify the collation.

- CREATE DATABASE redmine CHARACTER SET utf8;
+ CREATE DATABASE redmine CHARACTER SET utf8 COLLATE utf8_unicode_ci;

[1] http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci


Related issues 4 (1 open — 3 closed)

Related to Redmine - Defect #18866: MySQL: disappear after 4-Byte UTF-8ClosedActions
Related to Redmine - Defect #20143: Mailhandler cannot handle 4-byte charactersNewActions
Related to Redmine - Defect #21398: Mysql: 500 server error when submitting 4 bytes utf8 (to be saved in the 'notes' field)ClosedActions
Related to Redmine - Feature #31921: Changes to properly support 4 byte characters (emoji) when database is MySQLClosedGo MAEDAActions

Updated by Toshi MARUYAMA over 11 years ago Actions #1

  • Related to Defect #18866: MySQL: disappear after 4-Byte UTF-8 added

Updated by Toshi MARUYAMA over 11 years ago Actions #2

  • Subject changed from RedmineInstall: Step 2 - implement a best practice for MySQL to RedmineInstall: MySQL: collation_database

Updated by Toshi MARUYAMA over 11 years ago Actions #3

I don't prefer defining utf8_general_ci or utf8_unicode_ci because many Japanese web site recommends utf8_general_ci because of unacceptable matching HIRAGANA (ひらがな) and KATAKANA (カタカナ).

MySQL 5.5.3 supports utf8mb4_unicode_ci and utf8mb4_general_ci (#18866).

Updated by Toshi MARUYAMA over 11 years ago Actions #4

Updated by Toshi MARUYAMA over 11 years ago Actions #5

  • Related to deleted (Defect #18866: MySQL: disappear after 4-Byte UTF-8)

Updated by Toshi MARUYAMA over 11 years ago Actions #6

Updated by Toshi MARUYAMA over 11 years ago Actions #7

  • Related to Defect #18866: MySQL: disappear after 4-Byte UTF-8 added

Updated by Toshi MARUYAMA over 11 years ago Actions #8

  • Related to Defect #20143: Mailhandler cannot handle 4-byte characters added

Updated by @ go2null about 11 years ago Actions #9

How about the following change:

FROM


MySQL

CREATE DATABASE redmine CHARACTER SET utf8;
CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password';
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';

For versions of MySQL prior to 5.0.2 - skip the 'create user' step and instead:

GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost' IDENTIFIED BY 'my_password';

TO


MySQL

MySQL v5.5.3 and later

CREATE DATABASE redmine CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password';
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';

MySQL v5.0.2 and later

CREATE DATABASE redmine CHARACTER SET utf8 COLLATE utf8_unicode_ci;
CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password';
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';

MySQL v5.0.1 and earlier

CREATE DATABASE redmine CHARACTER SET utf8 COLLATE utf8_unicode_ci;
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost' IDENTIFIED BY 'my_password';

OR


Add the following recommendation:

It is recommended to use CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci for MySQL v5.5.3 and later, and CHARACTER SET utf8 COLLATE utf8_unicode_ci for earlier versions.

Updated by Toshi MARUYAMA almost 11 years ago Actions #10

  • Related to Defect #21398: Mysql: 500 server error when submitting 4 bytes utf8 (to be saved in the 'notes' field) added

Updated by Marius BĂLTEANU over 7 years ago Actions #11

  • Status changed from New to Closed

RedmineInstall was updated in the mean time.

Updated by Marius BĂLTEANU over 7 years ago Actions #12

  • Related to Feature #31921: Changes to properly support 4 byte characters (emoji) when database is MySQL added
Actions

Also available in: PDF Atom