Zen Cart Logo
Forums / Installing on a Windows Server / Failed to create tables under database setup step.

Failed to create tables under database setup step.

Locked

Views: 3,206

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
13 Oct 2006, 2:45 PM
#1
samcyh avatar

samcyh

New Zenner

Join Date:
Oct 2006
Posts:
13
Plugin Contributions:
0

Failed to create tables under database setup step.

Hi

As soon as I click on the save database setting, under the database setup step installation, I can see the zencart application try to create table under my database. Please see the blue color error message. The zencart is not allow me continuous the next step.

Please advise me the solution, I am using MYSQL5.0

http://localhost/shop/zc%5Finstall/index.php?main_page=database_setup&physical_path=C:/Inetpub/wwwroot/bede&virtual_http_path=http://localhost/shop&virtual_https_path=https://localhost/shop&virtual_https_server=https://localhost&enable_ssl=true&enable_ssl_admin=true&sql_cache_dir=&cache_type=&phpbb_dir=&sql_cache=C:/Inetpub/wwwroot/bede/cache&is_upgrade=&use_phpbb=false

Installation In Progress...

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
1101 BLOB/TEXT column 'products_options_values' can't have a default value
in:
[CREATE TABLE orders_products_attributes ( orders_products_attributes_id int(11) NOT NULL auto_increment, orders_id int(11) NOT NULL default '0', orders_products_id int(11) NOT NULL default '0', products_options varchar(32) NOT NULL default '', products_options_values BLOB NOT NULL default '', options_values_price decimal(15,4) NOT NULL default '0.0000', price_prefix char(1) NOT NULL default '', product_attribute_is_free tinyint(1) NOT NULL default '0', products_attributes_weight float NOT NULL default '0', products_attributes_weight_prefix char(1) NOT NULL default '', attributes_discounted tinyint(1) NOT NULL default '1', attributes_price_base_included tinyint(1) NOT NULL default '1', attributes_price_onetime decimal(15,4) NOT NULL default '0.0000', attributes_price_factor decimal(15,4) NOT NULL default '0.0000', attributes_price_factor_offset decimal(15,4) NOT NULL default '0.0000', attributes_price_factor_onetime decimal(15,4) NOT NULL default '0.0000', attributes_price_factor_onetime_offset decimal(15,4) NOT NULL default '0.0000', attributes_qty_prices text, attributes_qty_prices_onetime text, attributes_price_words decimal(15,4) NOT NULL default '0.0000', attributes_price_words_free int(4) NOT NULL default '0', attributes_price_letters decimal(15,4) NOT NULL default '0.0000', attributes_price_letters_free int(4) NOT NULL default '0', products_options_id int(11) NOT NULL default '0', products_options_values_id int(11) NOT NULL default '0', products_prid tinytext NOT NULL, PRIMARY KEY (orders_products_attributes_id), KEY idx_orders_id_prod_id_zen (orders_id,orders_products_id) ) TYPE=MyISAM;]

I logon to MYSQL Server and I can see some of the table has been created by zencart application. See details below:

mysql> use zencart
Database changed
mysql> show tables;
+----------------------------------+
| Tables_in_zencart |
+----------------------------------+
| address_book |
| address_format |
| admin |
| admin_activity_log |
| authorizenet |
| banners |
| banners_history |
| categories |
| categories_description |
| configuration |
| configuration_group |
| counter |
| counter_history |
| countries |
| coupon_email_track |
| coupon_gv_customer |
| coupon_gv_queue |
| coupon_redeem_track |
| coupon_restrict |
| coupons |
| coupons_description |
| currencies |
| customers |
| customers_basket |
| customers_basket_attributes |
| customers_info |
| db_cache |
| email_archive |
| ezpages |
| featured |
| files_uploaded |
| geo_zones |
| get_terms_to_filter |
| group_pricing |
| languages |
| layout_boxes |
| manufacturers |
| manufacturers_info |
| media_clips |
| media_manager |
| media_to_products |
| media_types |
| meta_tags_categories_description |
| meta_tags_products_description |
| music_genre |
| newsletters |
| orders |
| orders_products |
| upgrade_exceptions |
+----------------------------------+
49 rows in set (0.00 sec)

mysql>

17 Oct 2006, 5:15 AM
#2
spazashop avatar

spazashop

New Zenner

Join Date:
Oct 2006
Posts:
1
Plugin Contributions:
0

Re: Failed to create tables under database setup step.

I get exactly the same problem - also using mySQL 5.0 and zen cart 1.3.5; php 4.4.4

17 Oct 2006, 9:04 AM
#3
cjloong avatar

cjloong

New Zenner

Join Date:
Apr 2006
Posts:
2
Plugin Contributions:
0

Re: Failed to create tables under database setup step.

Hi
I am facing the same thing. It seems that the line that is giving problems is
products_options_values BLOB NOT NULL default ''

Looking at http://www.zen-cart.com/forum/showthread.php?t=37574&highlight=BLOB, it seems that the line should be written as
products_options_value_text BLOB NULL default NULL,

How should this problem be fixed? (I would not want to simply replace to avoid future schema problems.)

17 Oct 2006, 9:58 AM
#4
cjloong avatar

cjloong

New Zenner

Join Date:
Apr 2006
Posts:
2
Plugin Contributions:
0

Re: Failed to create tables under database setup step.

Seems that the problem happens to TEXT type field as well in query_builder table.

20 Oct 2006, 3:09 PM
#5
vinadir avatar

vinadir

New Zenner

Join Date:
Oct 2006
Posts:
1
Plugin Contributions:
0

Re: Failed to create tables under database setup step.

I have this exact same problem as well. It's kind of surprising how little info there is on this error, as it seems like it would be pretty prevalent.

I didn't want to make any changes to the schema in the sql file for the same reasons as the OP, I don't want to break anything else later on.

21 Oct 2006, 12:01 AM
#6
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

Re: Failed to create tables under database setup step.

Zen 1.3.5 isn't supported for MySQL 5.x.x yet - it may work, or you may get errors. It works fine with MySQL 4.4.x

3 Nov 2006, 10:16 PM
#7
lchoate avatar

lchoate

New Zenner

Join Date:
Nov 2006
Posts:
4
Plugin Contributions:
0

Re: Failed to create tables under database setup step.

Well, I think I got it to work in with MYSQL 5...

What I had to do was start the install with MYSQL in compatibility mode: (in the MYSQL Console)

SET @@global.sql_mode='MYSQL40'

Then I got past one error, to the next:

SET @@global.sql_mode='TRADITIONAL'

That did it. FYI, I am on XP/IIS/PHP5/MYSQL5