<
From version < 29.8 >
edited by Vincent Massol
on 2013/05/07
To version < 30.1 >
edited by Guillaume Fenollar
on 2013/11/29
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.VincentMassol
1 +XWiki.GuillaumeFenollar
Content
... ... @@ -23,36 +23,29 @@
23 23  * Download and install [[MySQL>>http://www.mysql.com/]] 5.x or greater.
24 24  * Start the MySQL server. You can do that in several ways. For example use {{code}}mysqld --console{{/code}}
25 25  * 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. You can create the database in several ways. For example use:
26 -{{code}}
27 -mysql -u root -e "create database xwiki default character set utf8 collate utf8_bin"
28 -{{/code}}
26 +{{code}}mysql -u root -e "create database xwiki default character set utf8 collate utf8_bin"{{/code}}
29 29  
30 -* Give all privileges to the xwiki user for accessing the xwiki database. You can do that in several ways. For example (if you get connection problems try localhost instead of the IP address below) use:
31 -{{code}}
32 -mysql -u root -e "grant all privileges on xwiki.* to xwiki@localhost identified by 'xwiki'"
33 -{{/code}}
28 +* Give all privileges to the xwiki user for accessing and creating databases. Starting with XWiki 5.0, all XWiki instances can create subwikis, so it's always better to give it rights to create some, from the beginning :
29 +{{code}}mysql -u root -e "grant all privileges on *.* to xwiki@localhost identified by 'xwiki'"{{/code}}
34 34  
35 35  * Please make sure that the DNS-name "localhost" is defined in your hosts-file (i.e. ##/etc/hosts##)
36 -* 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/downloads/connector/j/]] or directly from the [[Maven Central Repository>>http://repo1.maven.org/maven2/mysql/mysql-connector-java/]].
37 -(((
32 +* 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/downloads/connector/j/]] or directly from the [[Maven Central Repository>>http://repo1.maven.org/maven2/mysql/mysql-connector-java/]].(((
38 38  {{warning}}
39 39  You need the 5.x version or higher. The 3.x version doesn't handle Boolean data correctly and will either throw errors or will make all documents hidden by default.
40 40  {{/warning}}
41 41  )))
42 42  * 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:
43 -{{code language="xml"}}
44 -<property name="connection.url">jdbc:mysql://localhost/xwiki</property>
38 +{{code language="xml"}}<property name="connection.url">jdbc:mysql://localhost/xwiki</property>
45 45  <property name="connection.username">xwiki</property>
46 46  <property name="connection.password">xwiki</property>
47 47  <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
48 -<property name="dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
49 -{{/code}}
50 -(((
42 +<property name="dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>{{/code}}(((
51 51  {{info}}
52 52  * By default MySQL only accepts packets that are 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 {{code}}mysqld --console --max_allowed_packet=32M{{/code}} or you can modify directly the ##my.cnf## configuration file to set this value permanently.
53 53  * If an empty XWiki starts with no errors, but you are unable to upload the default set of pages (XAR file) try to increase the ##max_allowed_packet## parameter as shown above.
54 54  {{/info}}
55 55  )))
48 +
56 56  = Tips =
57 57  
58 58  == Convert a database from latin1 (or collation utf8_ci) to utf8/utf8_bin ==

Get Connected