Changes for page MySQL Installation

Last modified by Thomas Mortagne on 2023/11/16

<
From version < 12.2 >
edited by Sorin Burjan
on 2011/04/01
To version < 12.3 >
edited by Sorin Burjan
on 2011/04/04
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,7 +1,11 @@
1 -{{box cssClass="floatinginfobox" title="**Contents**"}}{{toc/}}{{/box}}
1 +{{box cssClass="floatinginfobox" title="**Contents**"}}
2 +{{toc/}}
3 +{{/box}}
2 2  
3 3  = Compatibility Considerations =
6 +
4 4  == MyISAM storage engine ==
8 +
5 5  MyISAM (the default storage engine for MySQL) does not support transactions. If there is an error while data is being saved to the database, XWiki will attempt to rollback the transaction to it's previous known good state. If you use MyISAM it will do nothing, leaving the database in whatever state it was in when the error occurred.
6 6  
7 7  {{warning}}
... ... @@ -9,6 +9,7 @@
9 9  {{/warning}}
10 10  
11 11  == MySQL versions older than 5.0 ==
16 +
12 12  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.
13 13  
14 14  = Installation Steps =
... ... @@ -33,7 +33,9 @@
33 33  )))
34 34  * Please make sure that the DNS-name "localhost" is defined in your hosts-file (i.e. /etc/hosts)
35 35  * 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/]].(((
36 -{{warning}}You need version 5.x or higher, version 3.x doesn't handle Boolean data correctly and will either throw errors, or will make all documents hidden by default.{{/warning}}
41 +{{warning}}
42 +You need version 5.x or higher, version 3.x doesn't handle Boolean data correctly and will either throw errors, or will make all documents hidden by default.
43 +{{/warning}}
37 37  )))
38 38  * 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:(((
39 39  {{code language="xml"}}
... ... @@ -45,16 +45,31 @@
45 45  {{/code}}
46 46  )))
47 47  
48 -{{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:(((
55 +{{info}}
56 +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:(((
49 49  {{code language="none"}}
50 50  mysqld --console --max_allowed_packet=32M
51 51  {{/code}}
52 -))){{/info}}
60 +)))
61 +{{/info}}
53 53  
54 -{{warning}}XWiki does not create automatically the Database Indexes. You can use the [[Admin Tools Application>>extensions:Extension.AdminTools]] for that or [[create them manually>>AdminGuide.Database Administration]]{{/warning}}
63 +{{warning}}
64 +XWiki does not create automatically the Database Indexes. You can use the [[Admin Tools Application>>extensions:Extension.AdminTools]] for that or [[create them manually>>AdminGuide.Database Administration]]
65 +{{/warning}}
55 55  
56 56  = Troubleshooting =
57 57  
69 +== Unable to create the database ==
70 +
71 +When running //"(% class="Apple-style-span" style="font-family: courier, 'courier new', monospace; white-space: pre; color: rgb(0, 0, 0); " %)mysql -u root -e "create database xwiki default character set utf8"// you may get a
72 +
73 +{{code language="none"}}
74 +ERROR 1045 (28000): Access denied for user 'xwiki'@'localhost' (using password: YES)
75 +
76 +{{/code}}
77 +
78 +This means that you have a password set for the MySQL root user but you are not specifying it in the console command. You must enter the //-p// parameter.
79 +
58 58  == Can't create test file ==
59 59  
60 60  When running ##mysqld ~-~-console## you may get the following (especially if you're on Mac):

Get Connected