<
From version < 7.1 >
edited by Vincent Massol
on 2010/03/05
To version < 7.2 >
edited by Vincent Massol
on 2010/03/05
>
Change comment: conversion to 2.0 and minor improvements

Summary

Details

Page properties
Content
... ... @@ -1,32 +1,32 @@
1 -{{toc start="" depth="" numbered=""/}}
1 +{{box cssClass="floatinginfobox" title="**Contents**"}}{{toc/}}{{/box}}
2 2  
3 3  = Installation Steps =
4 4  
5 5  Follow these instructions:
6 6  
7 -* Download and install [[MySQL>>http://www.mysql.com/]] 5.X or greater {{warning}}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 of the application works fine, but there are some parts that cannot easily be fixed, so if you must use MySQL 4.x, you're doing it on your own. Seriously, MySQL 4 is pretty old and buggy, you should consider upgrading.{{/warning}}
8 -* Start the MySQL server. You can do that in several ways. For example:
9 -
7 +* Download and install [[MySQL>>http://www.mysql.com/]] 5.X or greater.(((
8 +{{warning}}
9 +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 of the application works fine, but there are some parts that cannot easily be fixed, so if you must use MySQL 4.x, you're doing it on your own. Seriously, MySQL 4 is pretty old and buggy, you should consider upgrading.
10 +{{/warning}}
11 +)))
12 +* Start the MySQL server. You can do that in several ways. For example:(((
10 10  {{code language="none"}}
11 11  mysqld --console
12 12  {{/code}}
13 -
14 -* Create the wiki database. You can do that in several ways. For example:
15 -
16 +)))
17 +* Create the wiki database. You can do that in several ways. For example:(((
16 16  {{code language="none"}}
17 17  mysql -u root -e "create database xwiki"
18 18  {{/code}}
19 -
20 -* Give all privileges to the xwiki user for accessing the xwiki database. You can do that in several ways. For example (if you get connections problems try localhost instead of the IP address below):
21 -
21 +)))
22 +* Give all privileges to the xwiki user for accessing the xwiki database. You can do that in several ways. For example (if you get connections problems try localhost instead of the IP address below):(((
22 22  {{code language="none"}}
23 23  mysql -u root -e "grant all privileges on xwiki.* to xwiki@localhost identified by 'xwiki'"
24 24  {{/code}}
25 -
26 +)))
26 26  * Please make sure that the DNS-name "localhost" is defined in your hosts-file (i.e. /etc/hosts)
27 27  * 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/products/connector/j/]] or directly from the [[Maven Central Repository>>http://repo1.maven.org/maven2/mysql/mysql-connector-java/]].
28 -* 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:
29 -
29 +* 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:(((
30 30  {{code language="xml"}}
31 31  <property name="connection.url">jdbc:mysql://localhost/xwiki</property>
32 32  <property name="connection.username">xwiki</property>
... ... @@ -34,12 +34,13 @@
34 34  <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
35 35  <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
36 36  {{/code}}
37 +)))
37 37  
38 -Note: By default MySQL only accepts packets 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:
39 -
39 +{{info}}By default MySQL only accepts packets 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:(((
40 40  {{code language="none"}}
41 41  mysqld --console --max_allowed_packet=32M
42 42  {{/code}}
43 +))){{/info}}
43 43  
44 44  = Troubleshooting =
45 45  
... ... @@ -62,7 +62,7 @@
62 62  
63 63  == Data Truncation Error ==
64 64  
65 -If you receive an Exception like the following while installing / upgrading XWiki:
66 +If you receive an Exception like the following while installing/upgrading XWiki, chances are, that you are using an outdated version of MySQLConnectorJ.
66 66  
67 67  {{code language="none"}}
68 68  Caused by: java.sql.BatchUpdateException: Data truncation: Out of
... ... @@ -74,8 +74,6 @@
74 74   at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
75 75  {{/code}}
76 76  
77 -chances are, that you are using an outdated version of MySQLConnectorJ.
78 -
79 79  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.
80 80  
81 -Upgrade to the latest version of MySQLConnectorJ should solve such an error in most of the cases.
80 +Upgrading to the latest version of MySQLConnectorJ should solve such an error in most of the cases.

Get Connected