Zen Cart Logo
Forums / Installing on a Linux/Unix Server / trying to create new database

trying to create new database

Locked

Views: 890

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
24 May 2010, 4:11 PM
#1
jenbullfrog avatar

jenbullfrog

Zen Follower

Join Date:
Oct 2005
Location:
Helena, MT
Posts:
110
Plugin Contributions:
0

trying to create new database

I did a backup of current database, trying to create the tables on a new server.

Error
SQL query:

Table structure for table 'configuration'

CREATE TABLE configuration(

configuration_id INT( 11 ) AUTO_INCREMENT ,
configuration_title TEXT,
configuration_key VARCHAR( 255 ) DEFAULT '',
configuration_value TEXT,
configuration_description TEXT,
configuration_group_id INT( 11 ) DEFAULT '0',
sort_order INT( 5 ) ,
last_modified DATETIME,
date_added DATETIME DEFAULT '0001-01-01 00:00:00',
use_function TEXT,
set_function TEXT,
PRIMARY KEY ( configuration_id ) ,
UNIQUE unq_config_key_zen( configuration_key ) ,
KEY idx_key_value_zen( configuration_key, configuration_value ) ,
KEY idx_cfg_grp_id_zen( configuration_group_id )
);

MySQL said:

#1170 - BLOB/TEXT column 'configuration_value' used in key specification without a key length

I have no idea, it creates 9 tables then hits this error and fails

this is zen cart version 1.3.8
and mysql v. 5.0

24 May 2010, 4:33 PM
#2
jenbullfrog avatar

jenbullfrog

Zen Follower

Join Date:
Oct 2005
Location:
Helena, MT
Posts:
110
Plugin Contributions:
0

Re: trying to create new database

HEre's another one:

Error
SQL query:

Dumping data for table 'customers_basket'

Table structure for table 'customers_basket_attributes'

CREATE TABLE customers_basket_attributes(

customers_basket_attributes_id INT( 11 ) AUTO_INCREMENT ,
customers_id INT( 11 ) DEFAULT '0',
products_id TINYTEXT,
products_options_id VARCHAR( 64 ) DEFAULT '0',
products_options_value_id INT( 11 ) DEFAULT '0',
products_options_value_text BLOB,
products_options_sort_order TEXT,
PRIMARY KEY ( customers_basket_attributes_id ) ,
KEY idx_cust_id_prod_id_zen( customers_id, products_id )
);

MySQL said:

#1170 - BLOB/TEXT column 'products_id' used in key specification without a key length

24 May 2010, 4:33 PM
#3
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: trying to create new database

Try editing this line

KEY idx_key_value_zen( configuration_key, configuration_value ) ,

to read

KEY idx_key_value_zen( configuration_key, configuration_value(10)) ,

24 May 2010, 4:36 PM
#4
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: trying to create new database

KEY idx_cust_id_prod_id_zen (customers_id,products_id(36))

Seems that your backup mechanism isn't getting this quite right. I'm pulling these parameters from the Zen Cart install SQL (zc_install/sql/mysql_zencart.sql).

24 May 2010, 4:38 PM
#5
jenbullfrog avatar

jenbullfrog

Zen Follower

Join Date:
Oct 2005
Location:
Helena, MT
Posts:
110
Plugin Contributions:
0

Re: trying to create new database

OK thank you, thank you, very helpful! I've got it now. yes I wondered where you were getting those numbers!