<
From version < 6.2 >
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
Syntax
... ... @@ -1,1 +1,1 @@
1 -XWiki 1.0
1 +XWiki 2.0
Content
... ... @@ -1,62 +1,71 @@
1 -#toc("" "" "")
1 +{{box cssClass="floatinginfobox" title="**Contents**"}}{{toc/}}{{/box}}
2 2  
3 -1 Installation Steps
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.")
8 -* Start the MySQL server. You can do that in several ways. For example:
9 -{code:none}
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:(((
13 +{{code language="none"}}
10 10  mysqld --console
11 -{code}
12 -* Create the wiki database. You can do that in several ways. For example:
13 -{code:none}
15 +{{/code}}
16 +)))
17 +* Create the wiki database. You can do that in several ways. For example:(((
18 +{{code language="none"}}
14 14  mysql -u root -e "create database xwiki"
15 -{code}
16 -* 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):
17 -{code:none}
20 +{{/code}}
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):(((
23 +{{code language="none"}}
18 18  mysql -u root -e "grant all privileges on xwiki.* to xwiki@localhost identified by 'xwiki'"
19 -{code}
25 +{{/code}}
26 +)))
20 20  * Please make sure that the DNS-name "localhost" is defined in your hosts-file (i.e. /etc/hosts)
21 -* You need to have the MySQL JDBC Driver JAR (named <tt>mysql-connector-java*.jar</tt> installed in XWiki's WAR file. If this file isn't present in XWiki's <tt>WEB-INF/lib</tt> 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/].
22 -* Now you need to tell XWiki to use MySQL. To do this, edit the <tt>WEB-INF/hibernate.cfg.xml</tt> file where you have expanded the XWiki WAR file and replace the matching properties with the following ones:
23 -{code:xml}
28 +* 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/]].
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 +{{code language="xml"}}
24 24  <property name="connection.url">jdbc:mysql://localhost/xwiki</property>
25 25  <property name="connection.username">xwiki</property>
26 26  <property name="connection.password">xwiki</property>
27 27  <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
28 28  <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
29 -{code}
36 +{{/code}}
37 +)))
30 30  
31 -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:
32 -{code:none}
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 +{{code language="none"}}
33 33  mysqld --console --max_allowed_packet=32M
34 -{code}
42 +{{/code}}
43 +))){{/info}}
35 35  
36 -1 Troubleshooting
45 += Troubleshooting =
37 37  
38 -1.1 Can't create test file
47 +== Can't create test file ==
39 39  
40 -When running <tt>mysqld --console</tt> you may get the following (especially if you're on Mac):
49 +When running ##mysqld ~-~-console## you may get the following (especially if you're on Mac):
41 41  
42 -{code:none}
51 +{{code language="none"}}
43 43  071111 17:20:53 [Warning] Can't create test file /usr/local/mysql-5.0.45-osx10.4-i686/data/Vincent.lower-test
44 44  071111 17:20:53 [Warning] Can't create test file /usr/local/mysql-5.0.45-osx10.4-i686/data/Vincent.lower-test
45 45  mysqld: Can't change dir to '/usr/local/mysql-5.0.45-osx10.4-i686/data/' (Errcode: 13)
46 46  071111 17:20:53 [ERROR] Aborting
47 -{code}
56 +{{/code}}
48 48  
49 49  To start MySQL run the following instead:
50 50  
51 -{code}
60 +{{code}}
52 52  sudo /usr/local/mysql/bin/mysqld_safe --user=mysql
53 -{code}
62 +{{/code}}
54 54  
55 -1.1 Data Truncation Error
64 +== Data Truncation Error ==
56 56  
57 -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.
58 58  
59 -{code:none}
68 +{{code language="none"}}
60 60  Caused by: java.sql.BatchUpdateException: Data truncation: Out of
61 61  range value adjusted for column 'XWD_HIDDEN' at row 1
62 62   at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:894)
... ... @@ -64,11 +64,8 @@
64 64   at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294)
65 65   at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
66 66   at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
67 -{code}
76 +{{/code}}
68 68  
69 -chances are, that you are using an outdated version of MySQLConnectorJ.
78 +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.
70 70  
71 -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.
72 -
73 -Upgrade to the latest version of MySQLConnectorJ should solve such an error in most of the cases.
74 -
80 +Upgrading to the latest version of MySQLConnectorJ should solve such an error in most of the cases.
XWiki.XWikiComments[0]
Comment
... ... @@ -1,5 +1,1 @@
1 -Specifying Packet size when running MYSQL as service:
2 -For windows invoke services utility which lists all the service configured on your window platform.Go to MySQL service configuration. On "General Tab" we can find the file used by the MySQL service to load the parameters. For eg. in my case it is
3 -"d:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt" --defaults-file="d:\Program Files\MySQL\MySQL Server 5.0\my.ini".
4 -Add following line to configure size to 64M.
5 -max_allowed_packet=64M
1 +Specifying Packet size when running MYSQL as service: For windows invoke services utility which lists all the service configured on your window platform.Go to MySQL service configuration. On "General Tab" we can find the file used by the MySQL service to load the parameters. For eg. in my case it is "d:Program FilesMySQLMySQL Server 5.0binmysqld-nt" ~-~-defaults-file="d:Program FilesMySQLMySQL Server 5.0my.ini". Add following line to configure size to 64M. max_allowed_packet=64M
XWiki.XWikiComments[1]
Comment
... ... @@ -1,1 +1,1 @@
1 -I use the MySQL Administrator tool *almost* exclusively with MySQL tasks. It used to be a pain to work with (for example, disabled fields when they were not in the ini), but as at recent revisions (r8 in particular), this is no longer a problem.
1 +I use the MySQL Administrator tool **almost** exclusively with MySQL tasks. It used to be a pain to work with (for example, disabled fields when they were not in the ini), but as at recent revisions (r8 in particular), this is no longer a problem.
XWiki.XWikiComments[6]
Comment
... ... @@ -1,1 +1,1 @@
1 -Discovered (painfully) during installation of xwiki-enterprise-web-1.9.3.war in Apache Tomcat 5.5.23 using MySQL 5.0.45 that success required using the MySQL connector from Maven mysql-connector-java-5.1.6.jar (rather than from the MySQL Connector/J Driver page) and connection.url jdbc:mysql://127.0.0.1/xwiki (rather than jdbc:mysql://localhost/xwiki).
1 +Discovered (painfully) during installation of xwiki-enterprise-web-1.9.3.war in Apache Tomcat 5.5.23 using MySQL 5.0.45 that success required using the MySQL connector from Maven mysql-connector-java-5.1.6.jar (rather than from the MySQL Connector/J Driver page) and connection.url jdbc:mysql:~/~/127.0.0.1/xwiki (rather than jdbc:mysql:~/~/localhost/xwiki).

Get Connected