<
From version < 6.2 >
edited by Vincent Massol
on 2010/03/05
To version < 6.1 >
edited by Sergiu Dumitriu
on 2010/03/05
>
Change comment: Removed "Import Commands" section

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,0 @@
1 -MySQL Installation
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.VincentMassol
1 +XWiki.Sergiu
Content
... ... @@ -1,26 +1,28 @@
1 +1 MySQL Installation
2 +
1 1  #toc("" "" "")
2 2  
3 -1 Installation Steps
5 +1.1 Installation Steps
4 4  
5 5  Follow these instructions:
6 6  
7 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 8  * Start the MySQL server. You can do that in several ways. For example:
9 -{code:none}
11 +{code}
10 10  mysqld --console
11 11  {code}
12 12  * Create the wiki database. You can do that in several ways. For example:
13 -{code:none}
15 +{code}
14 14  mysql -u root -e "create database xwiki"
15 15  {code}
16 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}
19 +{code}
18 18  mysql -u root -e "grant all privileges on xwiki.* to xwiki@localhost identified by 'xwiki'"
19 19  {code}
20 20  * Please make sure that the DNS-name "localhost" is defined in your hosts-file (i.e. /etc/hosts)
21 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 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}
25 +{code}
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>
... ... @@ -29,17 +29,16 @@
29 29  {code}
30 30  
31 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}
34 +{code}
33 33  mysqld --console --max_allowed_packet=32M
34 34  {code}
37 +1.1 Troubleshooting
35 35  
36 -1 Troubleshooting
39 +1.1.1 Can't create test file
37 37  
38 -1.1 Can't create test file
39 -
40 40  When running <tt>mysqld --console</tt> you may get the following (especially if you're on Mac):
41 41  
42 -{code:none}
43 +{code}
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)
... ... @@ -52,11 +52,11 @@
52 52  sudo /usr/local/mysql/bin/mysqld_safe --user=mysql
53 53  {code}
54 54  
55 -1.1 Data Truncation Error
56 +1.1.1 Data Truncation Error
56 56  
57 57  If you receive an Exception like the following while installing / upgrading XWiki:
58 58  
59 -{code:none}
60 +{code}
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)

Get Connected