Error installing into UTF-8 MySQL database
- Status
- Closed
- Subject
- Error installing into UTF-8 MySQL database
- Version
- 3.x
- Category
- Error
- Feature
- Database MySQL (MyISAM)
Installer (profiles, upgrades and server-related issues) - Resolution status
- Fixed or Solved
- Submitted by
- ylavi
- Volunteered to solve
- Kissaki
- Lastmod by
- Kissaki
- Rating
- Description
When installing TikiWiki 3.0 into MySQL (I'm using 5.1.35 but I don't think it matters much) where the database has been created with a charset of 'utf-8' (typically because this is the server default), one table cannot be created and that command and subsequent inserts fail:
Copy to clipboardCREATE TABLE `tiki_sefurl_regex_out` ( `id` int(11) NOT NULL auto_increment, `left` varchar(256) NOT NULL, `right` varchar(256) NULL default NULL, `type` varchar(32) NULL default NULL, `silent` char(1) NULL default 'n', `feature` varchar(256) NULL default NULL, `comment` varchar(256), `order` int(11) NULL default 0, PRIMARY KEY(`id`), UNIQUE KEY `left` (`left`(256)), INDEX `idx1` (silent, type, feature(30)) ) y was too long; max key length is 767 bytes
The issue is that the table key is too long when using UTF-8. See http://bugs.mysql.com/bug.php?id=4541
.- Solution
1. Reinstall, using a database which has a charset of 'latin1'. But then does one have support for the desired character sets?
2. Run the commands again, adding "CHARSET 'latin1'" to the CREATE TABLE command. This will create the table with latin1 even though the rest of the tables in the database are utf-8.
I don't yet know whether no.2 actually works because after doing that I couldn't get into my Tiki.- Importance
- 3
- Priority
- 15
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 2559
- Created
- Tuesday 09 June, 2009 09:54:18 UTC
by Unknown - LastModif
- Friday 31 July, 2009 23:59:49 UTC