<
From version < 66.1 >
edited by Thomas Mortagne
on 2020/12/02
To version < 66.2 >
edited by Vincent Massol
on 2020/12/02
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.ThomasMortagne
1 +XWiki.VincentMassol
Content
... ... @@ -31,22 +31,22 @@
31 31  * 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.(((
32 32  You can create the database in several ways. For example use:
33 33  
34 -{{code}}
34 +{{code language='shell'}}
35 35  mysql -u root -e "create database xwiki default character set utf8mb4 collate utf8mb4_bin"
36 36  {{/code}}
37 37  )))
38 38  * Create the ##xwiki## user with password ##xwiki##(((
39 -{{code}}
39 +{{code language='shell'}}
40 40  mysql -u root -e "CREATE USER 'xwiki'@'localhost' IDENTIFIED BY 'xwiki'";
41 41  {{/code}}
42 42  )))
43 43  * Give privileges to the ##xwiki## user for accessing and creating databases (for the multi wiki support). Specifically the ##xwiki## users needs permissions to be able to execute {{code}}CREATE DATABASE{{/code}}, {{code}}DROP SCHEMA{{/code}}, and then all CRUD operations on tables. Note that the command below should be tuned to be more restrictive as granting all permissions is not required:(((
44 -{{code}}
44 +{{code language='shell'}}
45 45  mysql -u root -e "grant all privileges on *.* to xwiki@localhost"
46 46  {{/code}}
47 47  )))
48 48  * If the above command fails with a password-does-not-meet-requirements error, uninstall the MySQL password_validate plugin or pick a more complex password and update the password used by default in ##hibernate.cfg.xml##:(((
49 -{{code}}
49 +{{code language='shell'}}
50 50  mysql -u root -p -e "uninstall plugin validate_password;"
51 51  {{/code}}
52 52  )))
... ... @@ -77,7 +77,7 @@
77 77  
78 78  See [[Database Administration>>Documentation.AdminGuide.Performances.Database Administration.WebHome]].
79 79  
80 -{{code}}
80 +{{code language='mysql'}}
81 81  // Required
82 82  create index xwl_value on xwikilargestrings (xwl_value(50));
83 83  create index xwd_parent on xwikidoc (xwd_parent(50));
... ... @@ -104,7 +104,7 @@
104 104  {{info}}
105 105  Note to XWiki developers: The following indexes could be created automatically though since they're less than 255 characters and thus should be added in a future version of XWiki so that they don't need to be created manually:
106 106  
107 -{{code}}
107 +{{code language='mysql'}}
108 108  create index xws_number on xwikistatsdoc (XWS_NUMBER);
109 109  create index xws_classname on xwikistatsdoc (XWS_CLASSNAME);
110 110  create index xwr_number on xwikistatsreferer (XWR_NUMBER);
... ... @@ -126,7 +126,7 @@
126 126  * In the XWiki ##hibernate.cfg.xml## file in the ##hibernate.connection.serverTimezone## property (e.g. ##<property name="hibernate.connection.serverTimezone">Europe/Berlin</property>##).
127 127  * In the XWiki ##hibernate.cfg.xml## file inside the JDBC URL string as in ##jdbc:mysql:~/~/localhost:3306/myschema?serverTimezone=UTC##
128 128  
129 -{{code language="none"}}
129 +{{code language='none'}}
130 130  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.
131 131  {{/code}}
132 132  
... ... @@ -135,7 +135,7 @@
135 135  
136 136  == Convert a database from latin1 (or collation utf8_ci) to utf8mb4/utf8mb4_bin ==
137 137  
138 -{{code}}
138 +{{code language='shell'}}
139 139  #!/bin/bash
140 140  
141 141  db=xwiki
... ... @@ -161,7 +161,7 @@
161 161  
162 162  == Convert from MyISAM to InnoDB ==
163 163  
164 -{{code}}
164 +{{code language='shell'}}
165 165  #!/bin/bash
166 166  
167 167  MYSQL_COMMAND=mysql
... ... @@ -197,7 +197,7 @@
197 197  
198 198  == Unable to login to MySQL Console ==
199 199  
200 -When running {{code}}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.
200 +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.
201 201  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.
202 202  
203 203  == Can't create test file ==
... ... @@ -204,7 +204,7 @@
204 204  
205 205  When running ##mysqld ~-~-console## you may get the following (especially if you're on a Mac):
206 206  
207 -{{code}}
207 +{{code language='none'}}
208 208  071111 17:20:53 [Warning] Can't create test file /usr/local/mysql-5.0.45-osx10.4-i686/data/Vincent.lower-test
209 209  071111 17:20:53 [Warning] Can't create test file /usr/local/mysql-5.0.45-osx10.4-i686/data/Vincent.lower-test
210 210  mysqld: Can't change dir to '/usr/local/mysql-5.0.45-osx10.4-i686/data/' (Errcode: 13)
... ... @@ -221,7 +221,7 @@
221 221  
222 222  If you receive an Exception like the following while installing/upgrading XWiki, chances are that you are using an outdated version of MySQLConnectorJ.
223 223  
224 -{{code}}
224 +{{code language='none'}}
225 225  Caused by: java.sql.BatchUpdateException: Data truncation: Out of
226 226  range value adjusted for column 'XWD_HIDDEN' at row 1
227 227   at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:894)
... ... @@ -237,7 +237,7 @@
237 237  
238 238  == HTTP 500 Error ==
239 239  
240 -{{code}}
240 +{{code language='none'}}
241 241  HTTP Status 500 -
242 242  
243 243  type Exception report
... ... @@ -267,7 +267,7 @@
267 267  
268 268  If you get the following error:
269 269  
270 -{{code language="none"}}
270 +{{code language='none'}}
271 271  Caused by: class com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'xwiki'
272 272   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
273 273   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
... ... @@ -300,7 +300,7 @@
300 300  
301 301  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.
302 302  
303 -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}}).
303 +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}}).
304 304  
305 305  If this is the case [[you need to tell XWiki that you're using a different schema by setting the ##xwiki.db## configuration property>>platform:AdminGuide.Configuration#HConfigurethenamesofdatabaseschemas]].
306 306  
... ... @@ -308,7 +308,7 @@
308 308  
309 309  if you get the following error:
310 310  
311 -{{code language="none"}}
311 +{{code language='none'}}
312 312  MySQLSyntaxErrorException: Row size too large (> 8126).
313 313  Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help.
314 314  In current row format, BLOB prefix of 768 bytes is stored inline.

Get Connected