<
From version < 43.1 >
edited by Ahmet Taşdöven
on 2018/07/09
To version < 42.1 >
edited by Ahmet Taşdöven
on 2018/07/09
>
Change comment: Rollback to version 10.1

Summary

Details

Page properties
Content
... ... @@ -6,15 +6,12 @@
6 6  
7 7  == MyISAM storage engine ==
8 8  
9 -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 its 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.
9 +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.
10 +**If you use MySQL with default engine MyISAM, you will most likely corrupt your database.** We highly recommend using a storage engine such as InnoDB which supports transactions.
10 10  
11 -{{warning}}
12 -If you use MySQL with default engine MyISAM, you will most likely corrupt your database.** We highly recommend using a storage engine such as InnoDB which supports transactions.
13 -{{/warning}}
14 -
15 15  == MySQL versions older than 5.0 ==
16 16  
17 -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 be easily 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.
14 +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.
18 18  
19 19  = Installation Steps =
20 20  
... ... @@ -26,30 +26,18 @@
26 26  mysqld --console
27 27  {{/code}}
28 28  )))
29 -* Create the wiki database. You can use the name you want for the database, but you will have to set hibernate configuration file and xwiki.cfg file accordingly. You can create the database in several ways. For example:(((
26 +* Create the wiki database. You can do that in several ways. For example:(((
30 30  {{code language="none"}}
31 31  mysql -u root -e "create database xwiki default character set utf8"
32 32  {{/code}}
33 33  )))
34 -* 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):(((
31 +* 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):(((
35 35  {{code language="none"}}
36 36  mysql -u root -e "grant all privileges on xwiki.* to xwiki@localhost identified by 'xwiki'"
37 37  {{/code}}
38 -
39 -{{warning}}
40 -If you're going to use Workspace Manager, you should also grant access to the database ##workspacetemplate##
41 -{{/warning}}
42 -
43 -{{code language="none"}}
44 -mysql -u root -e "grant all privileges on workspacetemplate.* to xwiki@localhost identified by 'xwiki'"
45 -{{/code}}
46 -
47 -* Please make sure that the DNS-name "localhost" is defined in your hosts-file (i.e. /etc/hosts)
48 -* 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/]].(((
49 -{{warning}}
50 -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.
51 -{{/warning}}
52 52  )))
36 +* Please make sure that the DNS-name "localhost" is defined in your hosts-file (i.e. /etc/hosts)
37 +* 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/]].
53 53  * 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:(((
54 54  {{code language="xml"}}
55 55  <property name="connection.url">jdbc:mysql://localhost/xwiki</property>
... ... @@ -56,12 +56,12 @@
56 56  <property name="connection.username">xwiki</property>
57 57  <property name="connection.password">xwiki</property>
58 58  <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
59 -<property name="dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
44 +<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
60 60  {{/code}}
61 61  )))
62 62  
63 63  {{info}}
64 -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:
49 +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:
65 65  
66 66  (((
67 67  {{code language="none"}}
... ... @@ -70,38 +70,11 @@
70 70  )))
71 71  {{/info}}
72 72  
73 -(((
74 -{{info}}
75 -If an empty Xwiki starts with no errors, but you unable to upload the default set of pages (XAR file) also try to increase "max_allowed_packet" parameter as shown above.
76 -{{/info}}
77 -)))
78 -
79 -{{warning}}
80 -XWiki does not create the Database Indexes automatically. You can use the [[Admin Tools Application>>extensions:Extension.AdminTools]] for that or [[create them manually>>AdminGuide.Database Administration]]
81 -{{/warning}}
82 -)))
83 -
84 84  = Troubleshooting =
85 85  
86 -== Unable to login to MySQL Console ==
87 -
88 -When running
89 -
90 -{{code language="none"}}
91 -mysql -u root -e "create database xwiki default character set utf8
92 -{{/code}}
93 -
94 -you may get a
95 -
96 -{{code language="none"}}
97 -ERROR 1045 (28000): Access denied for user 'xwiki'@'localhost' (using password: YES)
98 -{{/code}}
99 -
100 -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 also use the //-p// parameter. Using this you will be prompted to enter the password and be allowed to login to the MySQL console and create the database.
101 -
102 102  == Can't create test file ==
103 103  
104 -When running ##mysqld ~-~-console## you may get the following (especially if you're on a Mac):
62 +When running ##mysqld ~-~-console## you may get the following (especially if you're on Mac):
105 105  
106 106  {{code language="none"}}
107 107  071111 17:20:53 [Warning] Can't create test file /usr/local/mysql-5.0.45-osx10.4-i686/data/Vincent.lower-test
... ... @@ -112,13 +112,13 @@
112 112  
113 113  To start MySQL run the following instead:
114 114  
115 -{{code language="none"}}
73 +{{code}}
116 116  sudo /usr/local/mysql/bin/mysqld_safe --user=mysql
117 117  {{/code}}
118 118  
119 119  == Data Truncation Error ==
120 120  
121 -If you receive an Exception like the following while installing/upgrading XWiki, chances are that you are using an outdated version of MySQLConnectorJ.
79 +If you receive an Exception like the following while installing/upgrading XWiki, chances are, that you are using an outdated version of MySQLConnectorJ.
122 122  
123 123  {{code language="none"}}
124 124  Caused by: java.sql.BatchUpdateException: Data truncation: Out of
... ... @@ -130,36 +130,6 @@
130 130   at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
131 131  {{/code}}
132 132  
133 -On Linux, mysql-connector-java-3.x has proven **not** to work due to a bug in the handling of UTF-8 and lack of support for Boolean types.
91 +On Linux, mysql-connector-java-3.x has proven **not** to work due to a bug in the handling of UTF-8, and lack of support for Boolean types.
134 134  
135 135  Upgrading to the latest version of MySQLConnectorJ should solve such an error in most of the cases.
136 -
137 -== HTTP 500 Error ==
138 -
139 -(((
140 -{{code language="none"}}
141 -HTTP Status 500 -
142 -
143 -type Exception report
144 -
145 -message
146 -
147 -descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
148 -
149 -exception
150 -
151 -javax.servlet.ServletException: com.xpn.xwiki.XWikiException: Error number 3 in 0: Could not initialize main XWiki context
152 -Wrapped Exception: Error number 3001 in 3: Cannot load class com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigrationManager from param xwiki.store.migration.manager.class
153 -Wrapped Exception: Error number 0 in 3: Exception while hibernate execute
154 -Wrapped Exception: Could not create a DBCP pool. There is an error in the hibernate configuration file, please review it.
155 -
156 -root cause
157 -
158 -com.xpn.xwiki.XWikiException: Error number 3 in 0: Could not initialize main XWiki context
159 -Wrapped Exception: Error number 3001 in 3: Cannot load class com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigrationManager from param xwiki.store.migration.manager.class
160 -Wrapped Exception: Error number 0 in 3: Exception while hibernate execute
161 -Wrapped Exception: Could not create a DBCP pool. There is an error in the hibernate configuration file, please review it.
162 -{{/code}}
163 -)))
164 -
165 -In this case, try to disable **skip-networking** in MySQL *.ini file. Thanks a lot M Rawash for saved time (see his comment below).

Get Connected