<
From version < 6.1 >
edited by Sergiu Dumitriu
on 2010/03/05
To version < 6.2 >
edited by Vincent Massol
on 2010/03/05
>
Change comment: use title

Summary

Details

Page properties
Title
... ... @@ -1,0 +1,1 @@
1 +MySQL Installation
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.Sergiu
1 +XWiki.VincentMassol
Content
... ... @@ -1,28 +3,26 @@
1 -1 MySQL Installation
2 -
3 3  #toc("" "" "")
4 4  
5 -1.1 Installation Steps
3 +1 Installation Steps
6 6  
7 7  Follow these instructions:
8 8  
9 9  * 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.")
10 10  * Start the MySQL server. You can do that in several ways. For example:
11 -{code}
9 +{code:none}
12 12  mysqld --console
13 13  {code}
14 14  * Create the wiki database. You can do that in several ways. For example:
15 -{code}
13 +{code:none}
16 16  mysql -u root -e "create database xwiki"
17 17  {code}
18 18  * 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):
19 -{code}
17 +{code:none}
20 20  mysql -u root -e "grant all privileges on xwiki.* to xwiki@localhost identified by 'xwiki'"
21 21  {code}
22 22  * Please make sure that the DNS-name "localhost" is defined in your hosts-file (i.e. /etc/hosts)
23 23  * 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/].
24 24  * 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:
25 -{code}
23 +{code:xml}
26 26  <property name="connection.url">jdbc:mysql://localhost/xwiki</property>
27 27  <property name="connection.username">xwiki</property>
28 28  <property name="connection.password">xwiki</property>
... ... @@ -31,16 +31,17 @@
31 31  {code}
32 32  
33 33  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:
34 -{code}
32 +{code:none}
35 35  mysqld --console --max_allowed_packet=32M
36 36  {code}
37 -1.1 Troubleshooting
38 38  
39 -1.1.1 Can't create test file
36 +1 Troubleshooting
40 40  
38 +1.1 Can't create test file
39 +
41 41  When running <tt>mysqld --console</tt> you may get the following (especially if you're on Mac):
42 42  
43 -{code}
42 +{code:none}
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  071111 17:20:53 [Warning] Can't create test file /usr/local/mysql-5.0.45-osx10.4-i686/data/Vincent.lower-test
46 46  mysqld: Can't change dir to '/usr/local/mysql-5.0.45-osx10.4-i686/data/' (Errcode: 13)
... ... @@ -53,11 +53,11 @@
53 53  sudo /usr/local/mysql/bin/mysqld_safe --user=mysql
54 54  {code}
55 55  
56 -1.1.1 Data Truncation Error
55 +1.1 Data Truncation Error
57 57  
58 58  If you receive an Exception like the following while installing / upgrading XWiki:
59 59  
60 -{code}
59 +{code:none}
61 61  Caused by: java.sql.BatchUpdateException: Data truncation: Out of
62 62  range value adjusted for column 'XWD_HIDDEN' at row 1
63 63   at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:894)

Get Connected