Patch #19742
closedRedmineInstall: MySQL: collation_database
0%
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;
Related issues
Updated by Toshi MARUYAMA over 9 years ago
- Related to Defect #18866: MySQL: disappear after 4-Byte UTF-8 added
Updated by Toshi MARUYAMA over 9 years ago
- Subject changed from RedmineInstall: Step 2 - implement a best practice for MySQL to RedmineInstall: MySQL: collation_database
Updated by Toshi MARUYAMA over 9 years ago
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 9 years ago
- Related to Defect #10772: 4-byte utf-8 characters added
Updated by Toshi MARUYAMA over 9 years ago
- Related to deleted (Defect #18866: MySQL: disappear after 4-Byte UTF-8)
Updated by Toshi MARUYAMA over 9 years ago
- Related to deleted (Defect #10772: 4-byte utf-8 characters)
Updated by Toshi MARUYAMA over 9 years ago
- Related to Defect #18866: MySQL: disappear after 4-Byte UTF-8 added
Updated by Toshi MARUYAMA over 9 years ago
- Related to Defect #20143: Mailhandler cannot handle 4-byte characters added
Updated by @ go2null about 9 years ago
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, andCHARACTER SET utf8 COLLATE utf8_unicode_ci
for earlier versions.
Updated by Toshi MARUYAMA about 9 years ago
- 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 5 years ago
- Status changed from New to Closed
RedmineInstall was updated in the mean time.
Updated by Marius BĂLTEANU over 5 years ago
- Related to Feature #31921: Changes to properly support 4 byte characters (emoji) when database is MySQL added