<
From version < 30.1 >
edited by Guillaume Fenollar
on 2013/11/29
To version < 30.3 >
edited by Juan De La Cruz
on 2014/03/10
>
Change comment: Added comment

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.GuillaumeFenollar
1 +XWiki.juannicolas
Content
... ... @@ -22,12 +22,17 @@
22 22  
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 -* 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}}mysql -u root -e "create database xwiki default character set utf8 collate utf8_bin"{{/code}}
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:
27 27  
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}}
30 -
27 +{{code}}
28 +mysql -u root -e "create database xwiki default character set utf8 collate utf8_bin"
29 +{{/code}}
30 +)))
31 +* Give all privileges to the ##xwiki## user for accessing and creating databases. Starting with XWiki 5.0, XWiki Enterprise can create subwikis out of the box, so it's better to it rights to create new schemas/databases from the beginning:(((
32 +{{code}}
33 +mysql -u root -e "grant all privileges on *.* to xwiki@localhost identified by 'xwiki'"
34 +{{/code}}
35 +)))
31 31  * Please make sure that the DNS-name "localhost" is defined in your hosts-file (i.e. ##/etc/hosts##)
32 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/]].(((
33 33  {{warning}}
... ... @@ -34,12 +34,13 @@
34 34  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.
35 35  {{/warning}}
36 36  )))
37 -* 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:
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:(((
38 38  {{code language="xml"}}<property name="connection.url">jdbc:mysql://localhost/xwiki</property>
39 39  <property name="connection.username">xwiki</property>
40 40  <property name="connection.password">xwiki</property>
41 41  <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
42 -<property name="dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>{{/code}}(((
47 +<property name="dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>{{/code}}
48 +
43 43  {{info}}
44 44  * 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.
45 45  * 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.
XWiki.XWikiComments[10]
Author
... ... @@ -1,0 +1,1 @@
1 +xwiki:XWiki.juannicolas
Comment
... ... @@ -1,0 +1,9 @@
1 +running mysql -u root -e "grant all privileges on xwiki.* to xwiki@localhost identified by 'xwiki'" will give you problems due to xwiki requires to run CREATE, DELETE on mysql. That's why the documentation tell you to run mysql -u root -e "grant all privileges on *.* to xwiki@localhost identified by 'xwiki'"
2 +
3 +If you don't want to give full access to whole mysql schema you could run instead:
4 +
5 +mysql -u root -e "grant SELECT,CREATE,DELETE on *.* to xwiki@localhost identified by 'xwiki'"
6 +
7 +and then
8 +
9 +mysql -u root -e "grant all privileges on xwiki.* to xwiki@localhost identified by 'xwiki'"
Date
... ... @@ -1,0 +1,1 @@
1 +2014-03-10 23:36:40.411

Get Connected