Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2020
    Location
    Boston MA
    Posts
    12
    Plugin Contributions
    0

    Default Had to Clean Install v157 now can't get my Database to work

    www.cpardydesign.com
    Version v157

    Hi I recently was adding an addon to my v156 Store, and messed up somewhere so that I couldn't access my Admin. I had made a backup of both the site and the database before doing so. When I went back to re-install from my backups nothing fixed the issue.

    Since it was an older version I decided to do a Clean Install of v157. I used the original database with all my product (there's a lot with a lot of attributes) and customers. When completing the install, there is absolutely Nothing in my Shop anymore.

    I tried importing the backup of the database previously used in MySql, but it gives me this error:
    Error
    SQL query:


    -- --------------------------------------------------------

    --
    -- Table structure for table `address_book`
    --

    CREATE TABLE `address_book` (
    `address_book_id` int(11) NOT NULL,
    `customers_id` int(11) NOT NULL DEFAULT '0',
    `entry_gender` char(1) NOT NULL DEFAULT '',
    `entry_company` varchar(64) DEFAULT NULL,
    `entry_firstname` varchar(32) NOT NULL DEFAULT '',
    `entry_lastname` varchar(32) NOT NULL DEFAULT '',
    `entry_street_address` varchar(64) NOT NULL DEFAULT '',
    `entry_suburb` varchar(32) DEFAULT NULL,
    `entry_postcode` varchar(10) NOT NULL DEFAULT '',
    `entry_city` varchar(32) NOT NULL DEFAULT '',
    `entry_state` varchar(32) DEFAULT NULL,
    `entry_country_id` int(11) NOT NULL DEFAULT '0',
    `entry_zone_id` int(11) NOT NULL DEFAULT '0'
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4
    MySQL said: Documentation

    #1050 - Table 'address_book' already exists
    Is there any hope that I don't have to completely redo ALL of my products from scratch?

    I'm not too worry about the customizations of the template itself... that I can fix easily.

  2. #2
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,133
    Plugin Contributions
    11

    Default Re: Had to Clean Install v157 now can't get my Database to work

    normally, the backup would look something like
    Code:
    Date: 2020-09-30 13:34:19*/
    
    
    SET FOREIGN_KEY_CHECKS=0;
    
    
    -- ----------------------------
    -- Table structure for `address_book`
    -- ----------------------------
    DROP TABLE IF EXISTS `address_book`;
    CREATE TABLE `address_book` (
      `address_book_id` int(11) NOT NULL AUTO_INCREMENT,
      `customers_id` int(11) NOT NULL DEFAULT '0',
      `entry_gender` char(1) NOT NULL DEFAULT '',
    The part in red is missing in your version and the reason you are getting the error.

    IF you use something like notepad++ and see the products in the backup database...

    IF you are confident of the quality of your backup....

    You might want to try emptying your current database before importing your backup database.

    Understand that loading/importing a database without products is a non-helper.

  3. #3
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Had to Clean Install v157 now can't get my Database to work

    Also the index fields are missing and a specific identification that the address_book_id is an autonumber field, but it may also work itself out and there might be some internal optimization that may take place to sort itself out.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Jan 2020
    Location
    Boston MA
    Posts
    12
    Plugin Contributions
    0

    Default Re: Had to Clean Install v157 now can't get my Database to work

    I looked through the database back up and the only thing I could see was some of my customers. For the products I could see the image files, but couldn't make sense of any of the product itself. So I am thinking I'm SOL on this one. I'm not even sure how to determine the Attributes (that would make re-adding all my product much easier, because at this point I'm not even sure what everything was, I had so much in there.)

    Would there be a way to go through the database back up in a text editor and isolate these. Just so I can have a blue print of how to set the shop up again? Or even would it be possible to EasyPopulate Attributes back in?

    It was built over many months and my brain can't hang onto all that.

    - Feeling defeated I'm not even sure I'm making any sense.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Had to Clean Install v157 now can't get my Database to work

    You said you did a fresh install overtop of the existing database and that that wiped out all your prior data.
    Yes, that's expected. And if you used zc_install to do the fresh install it warned you about wiping out prior data.

    Also, given what you've posted, it appears that your database-backup contains CREATE TABLE statements without any DROP TABLE statements before them, so it's expecting that the tables aren't already present. Therefore you will need to manually delete the tables from your database before you can restore using the backup you have.
    So, use phpMyAdmin and delete the tables in your store's database.
    Then import the backup to create and populate the tables.

    Then, since you replaced your store files with a new version, you'll need to make sure you have the zc_install directory in your server's files, and run zc_install from your browser and choose Upgrade to upgrade the database to the new structure.

    Then you can carry on with rebuilding your store, with your old data being present.

    Related: https://docs.zen-cart.com/user/upgrading/
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Trying to install TinyMCE but can't get it to work right in 1.5.5
    By huntleybill in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 24 May 2018, 05:59 PM
  2. Replies: 9
    Last Post: 31 May 2015, 01:03 PM
  3. old database on clean install
    By soxophoneplayer in forum Upgrading from 1.3.x to 1.3.9
    Replies: 1
    Last Post: 6 May 2010, 11:13 PM
  4. Product Images Randomly Disappeared - Now can't get them to work at all
    By charlestonrelics in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 30 Aug 2007, 02:49 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR