Changes between Version 47 and Version 48 of MySqlDb
- Timestamp:
- Feb 5, 2010, 12:53:19 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MySqlDb
v47 v48 18 18 The recommended versions of MySQL are those from 5.0.x series. 19 19 It might work with 4.1.x or 6.0.x, but no guarantees. 20 It seems that some users were using the [http://askmonty.org/wiki/index.php/MariaDB MariaDB] variant of MySQL, but again, no guarantees.20 Some users reported that [http://askmonty.org/wiki/index.php/MariaDB MariaDB] variant of MySQL works as well, but again, no guarantees. 21 21 22 22 To avoid unicode and international characters problems in Trac (e.g., international characters turning into question marks with mysterious "Incorrect string value" errors logged), the Trac database MUST be configured with the ''`utf8`'' character set and the ''`utf8_bin`'' collation type. All tables MUST be created as '''InnoDB''' or '''NDB''' type tables, because Trac uses a transaction mechanism that is not supported by MyISAM tables (see [comment:ticket:8067:5] and [http://dev.mysql.com/tech-resources/articles/storage-engine/part_3.html MySQL docs]). 23 23 24 A proper database can be created with the MySQL monitor, like this:24 A proper database can be created with any MySQL client, like this: 25 25 {{{ 26 26 CREATE DATABASE trac DEFAULT CHARACTER SET utf8 COLLATE utf8_bin; … … 31 31 mysql> USE trac; 32 32 Database changed 33 mysql> SHOW VARIABLES LIKE '%character%'; 34 +--------------------------+-------------------- 35 | Variable_name | Value 36 +--------------------------+-------------------- 37 | character_set_client | cp1251 38 | character_set_connection | cp1251 39 | character_set_database | utf8 40 | character_set_filesystem | binary 41 | character_set_results | cp1251 42 | character_set_server | utf8 43 | character_set_system | utf8 44 | character_sets_dir | C:\DevServer\Instal 45 +--------------------------+-------------------- 46 8 rows in set (0.00 sec) 33 mysql> SHOW VARIABLES WHERE variable_name IN ('character_set_database', 'collation_database'); 34 +------------------------+----------+ 35 | Variable_name | Value | 36 +------------------------+----------+ 37 | character_set_database | utf8 | 38 | collation_database | utf8_bin | 39 +------------------------+----------+ 40 2 rows in set (0.01 sec) 41 47 42 mysql> 43 }}} 44 45 If you are setting new collation on old database, make sure that columns are converted too: 46 {{{ 47 mysql> SHOW FULL COLUMNS FROM `node_change`; 48 +-------------+-------------+-----------+- 49 | Field | Type | Collation | 50 +-------------+-------------+-----------+- 51 | rev | varchar(64) | utf8_bin | 52 | path | text | utf8_bin | 53 | node_type | varchar(32) | utf8_bin | 54 | change_type | varchar(32) | utf8_bin | 55 | base_path | text | utf8_bin | 56 | base_rev | varchar(64) | utf8_bin | 57 +-------------+-------------+-----------+- 58 6 rows in set (0.00 sec) 48 59 }}} 49 60