Wiki source code of MySQL Installation

Last modified by Vincent Massol on 2025/03/03

Hide last authors
Sorin Burjan 12.3 1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
AkiBackman 1.22 4
Caleb James DeLisle 9.1 5 = Compatibility Considerations =
Sorin Burjan 12.3 6
Vincent Massol 49.2 7 See [[Database support strategy>>dev:Community.DatabaseSupportStrategy]] for the supported versions.
8
Thomas Mortagne 80.1 9 XWiki expects the database to use ##utf8## or ##utf8mb4## encoding with collation ##*_bin## and it's highly recommended to use ##utf8mb4## (and ##utf8mb4_bin##) which is the default since MySQL 8.
Thomas Mortagne 79.1 10
Caleb James DeLisle 9.1 11 == MyISAM storage engine ==
Sorin Burjan 12.3 12
Ricardo Rodríguez 71.1 13 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.
Caleb James DeLisle 9.1 14
Ahmet Taşdöven 43.1 15 {{warning}}
Beat Burgener 72.2 16 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.**
Ahmet Taşdöven 43.1 17 {{/warning}}
18
Caleb James DeLisle 9.1 19 == MySQL versions older than 5.0 ==
Sorin Burjan 12.3 20
Ricardo Rodríguez 71.1 21 XWiki does not fully work with MySQL versions 4.x or lower, due to several limitations of the way the SQL standards are implemented in MySQL, limited support for non-latin1 encodings, the flaky integration of Hibernate and MySQL 4, and other things. Most parts of the application work fine, but there are some parts that cannot be easily fixed, so if you must use MySQL 4.x, you're doing it on your own. MySQL 4 is pretty old and buggy, so we recommend upgrading.
Caleb James DeLisle 9.1 22
Thomas Mortagne 66.1 23 == MySQL versions older than 5.7 and utf8mb4 ==
Thomas Mortagne 65.1 24
Ricardo Rodríguez 71.1 25 If you use utf8mb4 encoding, you won't be able to use a version of MySQL older than 5.7 out of the box because of a limitation in the default maximum size of the keys and the default row format.
Thomas Mortagne 65.1 26
Vincent Massol 68.1 27 == JDBC Driver Version ==
28
Thomas Mortagne 82.1 29 * It's recommended to use the latest version of the MySQL JDBC driver (8.x).
Vincent Massol 68.1 30
Vincent Massol 7.1 31 = Installation Steps =
vmassol 1.12 32
Vincent Massol 1.11 33 Follow these instructions:
34
Thomas Mortagne 85.1 35 * Install MySQL 5.7 or greater and start it. It's always recommended to use the best method depending on your environment (for example a package on a Linux server), you can download it on [[MySQL>>http://www.mysql.com/]] if you want to manually install it.
Vincent Massol 44.1 36 * Create the wiki database. You can use the name you want for the database, but you will have to set the hibernate configuration file and ##xwiki.cfg## file accordingly.(((
37 You can create the database in several ways. For example use:
38
Thomas Mortagne 67.1 39 {{code language="shell"}}
Thomas Mortagne 51.1 40 mysql -u root -e "create database xwiki default character set utf8mb4 collate utf8mb4_bin"
Vincent Massol 30.2 41 {{/code}}
42 )))
Thomas Mortagne 58.1 43 * Create the ##xwiki## user with password ##xwiki##(((
Thomas Mortagne 67.1 44 {{code language="shell"}}
Thomas Mortagne 59.1 45 mysql -u root -e "CREATE USER 'xwiki'@'localhost' IDENTIFIED BY 'xwiki'";
Thomas Mortagne 58.1 46 {{/code}}
47 )))
Thomas Mortagne 88.1 48 * In XWiki, each subwiki has its own dedicated database, therefore, to use this feature, you will need to give privileges to the ##xwiki## user for accessing and creating any database databases. Specifically, the ##xwiki## users needs permissions to be able to execute {{code language="sql"}}CREATE DATABASE{{/code}}, {{code language="sql"}}DROP SCHEMA{{/code}}, and then all CRUD operations on tables. Note that the command below could be tuned to be more restrictive depending on your need:(((
Thomas Mortagne 67.1 49 {{code language="shell"}}
Thomas Mortagne 58.1 50 mysql -u root -e "grant all privileges on *.* to xwiki@localhost"
Vincent Massol 30.2 51 {{/code}}
52 )))
Thomas Mortagne 85.2 53 * You need to have the MySQL JDBC Driver JAR (named ##mysql-connector-java*.jar##) installed in XWiki's WAR file. If this file isn't present in XWiki's ##WEB-INF/lib## directory you'll need to download it and copy it there. You can download it from the [[MySQL Connector/J Driver page>>http://www.mysql.com/downloads/connector/j/]] or directly from the [[Maven Central Repository>>https://repo1.maven.org/maven2/com/mysql/mysql-connector-j/]].(((
Ahmet Taşdöven 43.1 54 {{warning}}
Thomas Mortagne 85.2 55 It's generally recommended to use the latest one.
Ahmet Taşdöven 43.1 56 {{/warning}}
Ahmet Taşdöven 41.1 57 )))
Vincent Massol 44.1 58 * Now you need to tell XWiki to use MySQL. To do this, edit the ##WEB-INF/hibernate.cfg.xml## file where you have expanded the XWiki WAR file and replace the matching properties with the following ones:(((
dkl 32.3 59 {{code language="xml"}}
60 <property name="connection.url">jdbc:mysql://localhost/xwiki</property>
vmassol 1.2 61 <property name="connection.username">xwiki</property>
62 <property name="connection.password">xwiki</property>
Thomas Mortagne 85.2 63 <property name="connection.driver_class">com.mysql.cj.jdbc.Driver</property>
Vincent Massol 44.1 64 <property name="connection.useUnicode">true</property>
65 <property name="connection.characterEncoding">UTF-8</property>
dkl 32.3 66 {{/code}}
Vincent Massol 30.2 67
Dmitry Bakbardin 15.1 68 {{info}}
Vincent Massol 66.4 69 * By default MySQL only accepts packets that are smaller than 1MB. If you get the "Packet for query is too large (max_allowed_packet)" error then see the [[Packet too large error page>>http://dev.mysql.com/doc/refman/5.0/en/packet-too-large.html]]. For example to increase the packet size to 32M you could start the MySQL server with {{code language='shell'}}mysqld --console --max_allowed_packet=32M{{/code}} or you can modify directly the ##my.cnf## configuration file to set this value permanently.
Vincent Massol 44.1 70 * If an empty XWiki starts with no errors, but you are unable to upload the default set of pages (XAR file) try to increase the ##max_allowed_packet## parameter as shown above.
Dmitry Bakbardin 15.1 71 {{/info}}
Ahmet Taşdöven 43.1 72 )))
73
Vincent Massol 55.1 74 = Indexes =
75
76 See [[Database Administration>>Documentation.AdminGuide.Performances.Database Administration.WebHome]].
77
Thomas Mortagne 67.1 78 {{code language="mysql"}}
Vincent Massol 55.1 79 // Required
80 create index xwl_value on xwikilargestrings (xwl_value(50));
81 create index xwd_parent on xwikidoc (xwd_parent(50));
82 create index xwd_class_xml on xwikidoc (xwd_class_xml(20));
83 create index xda_docid1 on xwikiattrecyclebin (xda_docid);
Thomas Mortagne 72.1 84 create index solr_iterate_all_documents on xwikidoc (XWD_WEB(500), XWD_NAME(253), XWD_LANGUAGE(5), XWD_VERSION(10));
Vincent Massol 55.1 85 // Only required if you use stats (feature is off by default)
86 create index xws_number on xwikistatsdoc (XWS_NUMBER);
87 create index xws_classname on xwikistatsdoc (XWS_CLASSNAME);
88 create index xwr_number on xwikistatsreferer (XWR_NUMBER);
89 create index xwr_classname on xwikistatsreferer (XWR_CLASSNAME);
90 create index xwr_referer on xwikistatsreferer (XWR_REFERER(50));
91 create index xwv_user_agent on xwikistatsvisit (XWV_USER_AGENT(255));
92 create index xwv_cookie on xwikistatsvisit (XWV_COOKIE(255));
93 create index xwv_classname on xwikistatsvisit (XWV_CLASSNAME);
94 create index xwv_number on xwikistatsvisit (XWV_NUMBER);
95 {{/code}}
96
97 {{info}}
Vincent Massol 89.2 98 Note to XWiki developers: The following indexes could be created automatically since they're less than 768 characters and thus should be added in a future version of XWiki so that they don't need to be created manually:
Vincent Massol 55.1 99
Eduard Moraru 68.2 100 {{code language="mysql"}}
Vincent Massol 55.1 101 create index xws_number on xwikistatsdoc (XWS_NUMBER);
102 create index xws_classname on xwikistatsdoc (XWS_CLASSNAME);
103 create index xwr_number on xwikistatsreferer (XWR_NUMBER);
104 create index xwr_classname on xwikistatsreferer (XWR_CLASSNAME);
105 create index xwv_classname on xwikistatsvisit (XWV_CLASSNAME);
106 create index xwv_number on xwikistatsvisit (XWV_NUMBER);
107 create index xda_docid1 on xwikiattrecyclebin (xda_docid);
108 {{/code}}
109 {{/info}}
110
Vincent Massol 44.1 111 = Tips =
Ahmet Taşdöven 43.1 112
Vincent Massol 60.1 113 == MySQL 8 ==
114
115 * If you're using MySQL 8+ you'll need to configure MySQL with native password: ##default-authentication-plugin=mysql_native_password##.
116 * You'll also be able to switch from ##com.mysql.jdbc.Driver## to ##com.mysql.cj.jdbc.Driver## JDBC driver (since the previous driver class is now deprecated).
Vincent Massol 64.1 117 * If you get the following error then you'll need to force the timezone to use either by setting it in:(((
118 * The MySQL conf file on the server
119 * In the XWiki ##hibernate.cfg.xml## file in the ##hibernate.connection.serverTimezone## property (e.g. ##<property name="hibernate.connection.serverTimezone">Europe/Berlin</property>##).
120 * In the XWiki ##hibernate.cfg.xml## file inside the JDBC URL string as in ##jdbc:mysql:~/~/localhost:3306/myschema?serverTimezone=UTC##
121
Thomas Mortagne 67.1 122 {{code language="none"}}
Vincent Massol 63.1 123 The server timezone value 'CDT' is unrecognized or represents more than one timezone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc timezone value if you want to utilize timezone support.
124 {{/code}}
Vincent Massol 60.1 125
Vincent Massol 63.1 126 For more details see [[this explanation post>>https://stackoverflow.com/a/54256150/153102]].
127 )))
128
Thomas Mortagne 77.1 129 == Convert a database to utf8mb4/utf8mb4_bin ==
Vincent Massol 27.1 130
Thomas Mortagne 67.1 131 {{code language="shell"}}
Vincent Massol 44.1 132 #!/bin/bash
Ahmet Taşdöven 43.1 133
Guilherme Sautner 87.1 134 db="${1:-xwiki}"
135
Thomas Mortagne 52.1 136 to_character_set=utf8mb4
137 to_collation=utf8mb4_bin
Ahmet Taşdöven 43.1 138
Vincent Massol 44.1 139 mysql_cmd="mysql -u root"
140
Guilherme Sautner 87.1 141 echo "Changing ($db) character to $to_collation."
142
Thomas Mortagne 52.1 143 $mysql_cmd -e "ALTER DATABASE $db CHARACTER SET $to_character_set COLLATE $to_collation;"
Vincent Massol 44.1 144
145 TBL_LIST=$($mysql_cmd -N -s -r -e "use $db;show tables;")
146
147 for tbl_name in $TBL_LIST;
148 do
Guilherme Sautner 87.1 149 $mysql_cmd -e "SET FOREIGN_KEY_CHECKS=0; alter table $db.$tbl_name convert to character set $to_character_set collate $to_collation; SET FOREIGN_KEY_CHECKS=1;"
Vincent Massol 44.1 150 done
151
152 echo "Here the result of the operation:"
153 $mysql_cmd -e "USE $db;SELECT TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, COLLATION_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA=DATABASE();"
Ahmet Taşdöven 43.1 154 {{/code}}
155
Thomas Mortagne 76.1 156 {{info}}
Mohamed Boussaa 72.3 157 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
158 xwikistatsvisit", you can use the following SQL statements to change tables column types to LONGTEXT to be able to convert the tables to utf8mb4.
Thomas Mortagne 76.1 159 {{/info}}
Mohamed Boussaa 72.3 160
161 {{code}}
162 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;
163 ALTER TABLE xwikistatsreferer MODIFY XWR_REFERER LONGTEXT;
164 ALTER TABLE xwikistatsvisit MODIFY XWV_USER_AGENT LONGTEXT, MODIFY XWV_COOKIE LONGTEXT;
165 ALTER TABLE xwikipreferences MODIFY XWP_LEFT_PANELS LONGTEXT, MODIFY XWP_RIGHT_PANELS LONGTEXT, MODIFY XWP_DOCUMENT_BUNDLES LONGTEXT;
166 {{/code}}
167
Guillaume Delhumeau 57.1 168 You can also look at [[this snippet to perform this conversion inside XWiki>>snippets:Extension.Migrate MySQL databases to utf8mb4]].
Guillaume Delhumeau 56.1 169
Vincent Massol 44.1 170 == Convert from MyISAM to InnoDB ==
Ahmet Taşdöven 43.1 171
Thomas Mortagne 67.1 172 {{code language="shell"}}
Vincent Massol 44.1 173 #!/bin/bash
174
175 MYSQL_COMMAND=mysql
176 TO_ENGINE=INNODB
177
178 DATABASES=$(mysql -N -s -r -e 'show databases'|grep -v ^information_schema$|grep -v ^mysql$)
179
180 for db in $DATABASES
181 do
182
183 echo "Working on database $db..."
184 echo ""
185
186 TABLES=$(mysql -N -s -r -e "show tables from $db;")
187
188 for tb in $TABLES
189 do
190
191 $MYSQL_COMMAND -e "ALTER TABLE $db.$tb ENGINE = $TO_ENGINE;"
192
193 done
194
195 $MYSQL_COMMAND -e "SELECT table_name,Engine,table_collation FROM information_schema.tables WHERE table_schema = DATABASE();"
196
197 echo ""
198 echo ""
199
200 done
Ahmet Taşdöven 43.1 201 {{/code}}
202
Vincent Massol 44.1 203 = Troubleshooting =
204
Thomas Mortagne 81.1 205 == "Incorrect string value" error with MySQL connector between 8.0.29 and 8.0.32 ==
Thomas Mortagne 78.1 206
Thomas Mortagne 81.1 207 {{info}}
208 This is fixed in the connector 8.0.33.
209 {{/info}}
210
Thomas Mortagne 78.1 211 There seems to be a regression in MySQL connector 8.0.29 that leads to using the default encoding even when it's explicitly indicated in the hibernate.cfg.xml file (which is what you have in the MySQL configuration recommendation provided by XWiki). We are currently searching what could be the cause and find a workaround in https://jira.xwiki.org/browse/XWIKI-19853 but in the (and in general) it's recommended to make sure that you are running XWiki with the right default Java encoding. You can do that by making sure Java is run with ##-Dfile.encoding=utf8## (this is generally the default in standard Tomcat packages of various Linux distribution, but it might not always be the case).
212
Vincent Massol 44.1 213 == Unable to login to MySQL Console ==
214
Thomas Mortagne 67.1 215 When running {{code language="shell"}}mysql -u root -e "create database xwiki default character set utf8mb4{{/code}} you may get a {{code}}ERROR 1045 (28000): Access denied for user 'xwiki'@'localhost' (using password: YES){{/code}} error.
Ahmet Taşdöven 43.1 216 This means that you have a password set for the MySQL root user, but you are not specifying it in the console command. You must also use the //-p// parameter. Using this you will be prompted to enter the password and be allowed to login to the MySQL console and create the database.
217
Vincent Massol 7.1 218 == Can't create test file ==
Vincent Massol 6.2 219
Ahmet Taşdöven 43.1 220 When running ##mysqld ~-~-console## you may get the following (especially if you're on a Mac):
Vincent Massol 1.16 221
Thomas Mortagne 67.1 222 {{code language="none"}}
Vincent Massol 1.16 223 071111 17:20:53 [Warning] Can't create test file /usr/local/mysql-5.0.45-osx10.4-i686/data/Vincent.lower-test
224 071111 17:20:53 [Warning] Can't create test file /usr/local/mysql-5.0.45-osx10.4-i686/data/Vincent.lower-test
225 mysqld: Can't change dir to '/usr/local/mysql-5.0.45-osx10.4-i686/data/' (Errcode: 13)
226 071111 17:20:53 [ERROR] Aborting
Vincent Massol 7.1 227 {{/code}}
Vincent Massol 1.16 228
Vincent Massol 44.1 229 To start MySQL run the following command instead:
Vincent Massol 1.16 230
Vincent Massol 44.1 231 {{code}}
Vincent Massol 1.16 232 sudo /usr/local/mysql/bin/mysqld_safe --user=mysql
Vincent Massol 7.1 233 {{/code}}
Vincent Massol 1.16 234
Vincent Massol 7.1 235 == Data Truncation Error ==
2smart4u 5.1 236
Ahmet Taşdöven 43.1 237 If you receive an Exception like the following while installing/upgrading XWiki, chances are that you are using an outdated version of MySQLConnectorJ.
2smart4u 5.1 238
Thomas Mortagne 67.1 239 {{code language="none"}}
2smart4u 5.1 240 Caused by: java.sql.BatchUpdateException: Data truncation: Out of
241 range value adjusted for column 'XWD_HIDDEN' at row 1
242 at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:894)
243 at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294)
244 at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294)
245 at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
246 at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
Vincent Massol 7.1 247 {{/code}}
2smart4u 5.1 248
Ahmet Taşdöven 43.1 249 On Linux, mysql-connector-java-3.x has proven **not** to work due to a bug in the handling of UTF-8 and lack of support for Boolean types.
2smart4u 5.1 250
Vincent Massol 7.2 251 Upgrading to the latest version of MySQLConnectorJ should solve such an error in most of the cases.
Ahmet Taşdöven 43.1 252
253 == HTTP 500 Error ==
254
Thomas Mortagne 67.1 255 {{code language="none"}}
Ahmet Taşdöven 43.1 256 HTTP Status 500 -
257
258 type Exception report
259
260 message
261
262 descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
263
264 exception
265
266 javax.servlet.ServletException: com.xpn.xwiki.XWikiException: Error number 3 in 0: Could not initialize main XWiki context
267 Wrapped Exception: Error number 3001 in 3: Cannot load class com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigrationManager from param xwiki.store.migration.manager.class
268 Wrapped Exception: Error number 0 in 3: Exception while hibernate execute
269 Wrapped Exception: Could not create a DBCP pool. There is an error in the hibernate configuration file, please review it.
270
271 root cause
272
273 com.xpn.xwiki.XWikiException: Error number 3 in 0: Could not initialize main XWiki context
274 Wrapped Exception: Error number 3001 in 3: Cannot load class com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigrationManager from param xwiki.store.migration.manager.class
275 Wrapped Exception: Error number 0 in 3: Exception while hibernate execute
276 Wrapped Exception: Could not create a DBCP pool. There is an error in the hibernate configuration file, please review it.
277 {{/code}}
278
Vincent Massol 44.1 279 In this case, try to disable **skip-networking** in MySQL *.ini file. Thanks a lot //M Rawash// (see his comment below).
280
281 == Unknown database 'xwiki' ==
282
283 If you get the following error:
284
Thomas Mortagne 67.1 285 {{code language="none"}}
Vincent Massol 44.1 286 Caused by: class com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'xwiki'
287 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
288 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
289 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
290 at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
291 at com.mysql.jdbc.Util.handleNewInstance(Util.java:408)
292 at com.mysql.jdbc.Util.getInstance(Util.java:383)
293 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1062)
294 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4226)
295 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4158)
296 at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2615)
297 at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2776)
298 at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2834)
299 at com.mysql.jdbc.ConnectionImpl.setCatalog(ConnectionImpl.java:5456)
300 at org.apache.commons.dbcp.DelegatingConnection.setCatalog(DelegatingConnection.java:374)
301 at org.apache.commons.dbcp.DelegatingConnection.setCatalog(DelegatingConnection.java:374)
302 at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setCatalog(PoolingDataSource.java:333)
303 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
304 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
305 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
306 at java.lang.reflect.Method.invoke(Method.java:606)
307 at org.hibernate.jdbc.BorrowedConnectionProxy.invoke(BorrowedConnectionProxy.java:74)
308 at com.sun.proxy.$Proxy47.setCatalog(Unknown Source)
309 at com.xpn.xwiki.store.XWikiHibernateBaseStore.setDatabase(XWikiHibernateBaseStore.java:729)
310 at com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:911)
311 at com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:843)
312 at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:830)
313 ...
314 {{/code}}
315
Thomas Mortagne 83.1 316 It means that XWiki could connect to your database but there's no ##xwiki## schema available there. This is the default name of the schema XWiki is looking for, for the main wiki database.
Vincent Massol 44.1 317
Thomas Mortagne 67.1 318 It probably means you've created a database named other than ##xwiki## (for example you might have created a database named ##abcd## and set the following connection URL in your ##hibernate.cfg## file: {{code language="none"}}<property name="connection.url">jdbc:mysql://localhost/abcd</property>{{/code}}).
Vincent Massol 44.1 319
Thomas Mortagne 83.1 320 If this is the case [[you need to tell XWiki that you're using a different schema by setting the ##xwiki.db## configuration property>>Documentation.AdminGuide.Configuration#HConfigurethenamesofdatabaseschemas]].
Vincent Massol 44.1 321
322 == MySQLSyntaxErrorException: Row size too large (> 8126) ==
323
324 if you get the following error:
325
Thomas Mortagne 67.1 326 {{code language="none"}}
Thomas Mortagne 83.1 327 MySQLSyntaxErrorException: Row size too large (> 8126).
328 Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help.
Vincent Massol 44.1 329 In current row format, BLOB prefix of 768 bytes is stored inline.
330 {{/code}}
331
Eduard Moraru 68.2 332 When you are using a MySQL Server 5.6.20 you can get a "row size too large error."
Vincent Massol 44.1 333 In the release notes, it is explained that a innodb_log_file_size which is too small will trigger a "Row size too large error."
334
335 You can solve the problem by changing the innodb_log_file_size in the my.ini text file.
336 Find more details in the link below.
337 http://dev.mysql.com/doc/relnotes/mysql/5.6/en/news-5-6-20.html

Get Connected