<
From version < 72.1 >
edited by Thomas Mortagne
on 2021/10/28
To version < 72.3 >
edited by Mohamed Boussaa
on 2022/04/12
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.ThomasMortagne
1 +XWiki.mouhb
Content
... ... @@ -11,7 +11,7 @@
11 11  MyISAM (the default storage engine for MySQL until release 5.5.5 in 2010) does not support transactions. If there is an error while data is being saved to the database, XWiki will attempt to roll back the transaction to its previous known good state. If you use MyISAM, it will do nothing, leaving the database in whatever state it was in when the error occurred.
12 12  
13 13  {{warning}}
14 -If you use MySQL with any engine that does not support transactions, you will most likely corrupt your database.** We highly recommend using a storage engine such as InnoDB which supports transactions.**
14 +If you use MySQL with any engine that does not support transactions, you will most likely corrupt your database.** We highly recommend using a storage engine such as InnoDB which supports transactions.**
15 15  {{/warning}}
16 16  
17 17  == MySQL versions older than 5.0 ==
... ... @@ -157,6 +157,24 @@
157 157  $mysql_cmd -e "USE $db;SELECT TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, COLLATION_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA=DATABASE();"
158 158  {{/code}}
159 159  
160 +(% class="box infomessage" %)
161 +(((
162 +In case the above script fails to convert some rows with "ERROR 1833 (HY000) at line 1: Cannot change column 'columnname': used in a foreign key constraint 'FK2bj2ghquiq79toomkvugw7iie' of table 'xwiki.tablename', you can drop the foreign keys, convert the columns and then restart xWiki. Hibernate will re-create the dropped indexes automatically.
163 +)))
164 +
165 +(% class="box infomessage" %)
166 +(((
167 +In case the above script fails with "ERROR 1118 (42000) at line 1: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
168 +xwikistatsvisit", you can use the following SQL statements to change tables column types to LONGTEXT to be able to convert the tables to utf8mb4.
169 +)))
170 +
171 +{{code}}
172 +ALTER TABLE activitystream_events MODIFY ase_url LONGTEXT, MODIFY ase_title LONGTEXT, MODIFY ase_body LONGTEXT, MODIFY ase_param1 LONGTEXT, MODIFY ase_param2 LONGTEXT, MODIFY ase_param3 LONGTEXT, MODIFY ase_param4 LONGTEXT, MODIFY ase_param5 LONGTEXT;
173 +ALTER TABLE xwikistatsreferer MODIFY XWR_REFERER LONGTEXT;
174 +ALTER TABLE xwikistatsvisit MODIFY XWV_USER_AGENT LONGTEXT, MODIFY XWV_COOKIE LONGTEXT;
175 +ALTER TABLE xwikipreferences MODIFY XWP_LEFT_PANELS LONGTEXT, MODIFY XWP_RIGHT_PANELS LONGTEXT, MODIFY XWP_DOCUMENT_BUNDLES LONGTEXT;
176 +{{/code}}
177 +
160 160  You can also look at [[this snippet to perform this conversion inside XWiki>>snippets:Extension.Migrate MySQL databases to utf8mb4]].
161 161  
162 162  == Convert from MyISAM to InnoDB ==

Get Connected