PDA

View Full Version : mysql error while installing the xml


duriast
03-12-2006, 07:38 PM
Hi!
If I install the xml the following error occurs:

Datenbankfehler in vBulletin 3.5.3:

Invalid SQL:
CREATE TABLE drupal_amazonitem (
ASIN varchar(10) NOT NULL default '',
DetailPageURL text,
SmallImageURL varchar(255) default '',
SmallImageHeight int(10) unsigned default '0',
SmallImageWidth int(10) unsigned default '0',
MediumImageURL varchar(255) default '',
MediumImageHeight int(10) unsigned default '0',
MediumImageWidth int(10) unsigned default '0',
LargeImageURL varchar(255) default '',
LargeImageHeight int(10) unsigned default '0',
LargeImageWidth int(10) unsigned default '0',
Author varchar(255) NOT NULL default '',
Binding varchar(100) default '',
listAmount int(10) unsigned default '0',
listCurrencyCode char(3) default '',
listFormattedPrice varchar(10) default '',
Title varchar(100) NOT NULL default '',
Amount int(10) unsigned default '0',
CurrencyCode char(3) default '',
FormattedPrice varchar(10) default '',
Availability varchar(50) default '',
PriceDate datetime default '0000-00-00 00:00:00',
PRIMARY KEY (ASIN),
UNIQUE KEY ASIN (ASIN),
KEY Title (Title),
KEY Author (Author,Title)
) TYPE=MyISAM;

MySQL-Fehler : Specified key was too long; max key length is 1000 bytes
Fehler-Nr. : 1071
Datum : Monday, March 13th 2006 @ 02:51:00 AM
Skript : http://SECRET:)/admincp/plugin.php
Referrer : http://SECRET:)/admincp/plugin.php?do=productadd

Klassenname : vb_database


I am using: MySQL-Version 4.1.14

bill
03-12-2006, 10:22 PM
I had the same problem on install. I kludged my way around it and posted it (http://www.vbulletin.org/forum/showthread.php?p=880959&highlight=bill3#post880959)in the original thread on vbulletin.org:
I fixed this problem. Seems that UTF-8 databases in MySQL is the culprit. The work-around was to use this SQL query:

ALTER DATABASE `vbforum` DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci
to convert my database. After doing that I was able to import the vBDrupal xml file into the Plugin System.

Here is the MySQL manual reference: 13.1.1. ALTER DATABASE Syntax (http://dev.mysql.com/doc/refman/5.0/en/alter-database.html)

I converted the database to latin 1 for the purpose of importing product-drupal.xml into vB, but after the import was complete I reverted back to UTF-8:

ALTER DATABASE `vbforum` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci
I'm still not sure whether this is the appropriate way to handle this, but I've had to do it a few times with my IIS server and it's worked every time.