• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

SQL help

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

ati

Member
Joined
Aug 4, 2004
I formatted my home server that hosts my site and now i need to reupload my sql db but when I do it it gives me this
Code:
Error

SQL query:

#
# Dumping data for table `mos_content_rating`
#
# --------------------------------------------------------
#
# Table structure for table `mos_core_acl_aro`
#
CREATE TABLE `mos_core_acl_aro` (
`aro_id` int( 11 ) NOT NULL AUTO_INCREMENT ,
`section_value` varchar( 240 ) NOT NULL default '0',
`value` varchar( 240 ) NOT NULL default '',
`order_value` int( 11 ) NOT NULL default '0',
`name` varchar( 255 ) NOT NULL default '',
`hidden` int( 11 ) NOT NULL default '0',
PRIMARY KEY ( `aro_id` ) ,
UNIQUE KEY `section_value_value_aro` ( `section_value` , `value` ) ,
UNIQUE KEY `mos_gacl_section_value_value_aro` ( `section_value` , `value` ) ,
KEY `hidden_aro` ( `hidden` ) ,
KEY `mos_gacl_hidden_aro` ( `hidden` )
) TYPE = MYISAM AUTO_INCREMENT =32;

MySQL said: Documentation
#1071 - Specified key was too long; max key length is 1000 bytes

I am using a newer versino of AppServ and it has a different version of mysql so it might be that or my export of the db was wrong. Can anyone help? I have no idea what that means.
 
I am not familiar with AppServ, MySQL, or whatever it is you are attempting to do. But I work with SQL and can tell you what that error means.

Databases consist of tables, which consist of fields. The fields are columns of data that specify attributes for each record (row) of data. A Key is a field that is required to have a value. These Keys are used to uniquely identify each row of data. Non-Key fields can contain a value or be blank.

This message is stating that the value for one of the Key fields for a particular row of data is too long. I suspect that the newer version you are importing to has undergone database structure revisions and the max length for one of the Key fields has been reduced.

This message does not specify which field caused the error. But the message you posted lists a few Key fields. That # 1071 might indicate the row of data that caused the error; or it could represent one of many other things depending on how the program was designed. If you can find the row of data that is greater than 1000 bytes and correct it, then you should be able to restart that portion of the upgrade.
 
klingens said:
Use phpmyadmin. Don't do all at once but portion it to out to several pieces, each under 1000 bytes.


I am uploading it through phpmyadmin. How would I separate it into different pieces?
 
Back