Changes for page MySQL Installation
Last modified by Thomas Mortagne on 2022/05/25
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. ralatsdc1 +XWiki.2smart4u - Content
-
... ... @@ -17,8 +17,9 @@ 17 17 {code} 18 18 * 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): 19 19 {code} 20 -mysql -u root -e "grant all privileges on xwiki.* to xwiki@ 127.0.0.1identified by 'xwiki'"20 +mysql -u root -e "grant all privileges on xwiki.* to xwiki@localhost identified by 'xwiki'" 21 21 {code} 22 +* Please make sure that the DNS-name "localhost" is defined in your hosts-file (i.e. /etc/hosts) 22 22 * 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/]. 23 23 * 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: 24 24 {code} ... ... @@ -33,7 +33,6 @@ 33 33 {code} 34 34 mysqld --console --max_allowed_packet=32M 35 35 {code} 36 - 37 37 1.1 Troubleshooting 38 38 39 39 1.1.1 Can't create test file ... ... @@ -63,3 +63,23 @@ 63 63 mysql -u xwiki -p xwiki -h 127.0.0.1 < mycommands.sql 64 64 {code} 65 65 66 +1.1.1 Data Truncation Error 67 + 68 +If you receive an Exception like the following while installing / upgrading XWiki: 69 + 70 +{code} 71 +Caused by: java.sql.BatchUpdateException: Data truncation: Out of 72 +range value adjusted for column 'XWD_HIDDEN' at row 1 73 + at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:894) 74 + at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294) 75 + at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294) 76 + at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48) 77 + at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246) 78 +{code} 79 + 80 +chances are, that you are using an outdated version of MySQLConnectorJ. 81 + 82 +On Linux, mysql-connector-java-3.1.14-bin.jar has proven *not* to work due to a bug in the handling of UTF-8. 83 + 84 +Upgrade to the latest version of MySQLConnectorJ should solve such an error in most of the cases. 85 +
- XWiki.XWikiComments[6]
-
- Date
-
... ... @@ -1,1 +1,1 @@ 1 -2009-08-14 21:46:39. 2401 +2009-08-14 21:46:39.0