Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Mar 2007
    Location
    Worcester UK
    Posts
    135
    Plugin Contributions
    0

    Default Problem changing all DB collations to utf8mb3_general_ci

    I wish to upgrade from 1.5.7c to 2.1
    The existing DB for v 1.5.7c has mixed colllation Latin and utf8-comms.
    I understand that this existing 155b database needs upgrading to bring all the collations to utf8mb4 before it can be imported to the 2.1 site.

    ZenCart v 1.5.7c
    PHP 7.4.33
    The existing DB forv 1.5.7c has mixed collation.... latin1_general_ci and utf8mb3_general_ci


    I have run the tool available for global collation edit (convert_database.php)

    I receive the following problem report

    "The database's character-set doesn't match DB_CHARSET.
    92 tables don't have the same collation as the base database's. These issues can be corrected without a full database conversion.
    335 fields don't have the same collation as the base database's. These issues can be corrected without a full database conversion.
    108 tables don't have the same collation as the base database's1.
    372 fields don't have the same collation as the base database's1.
    2 date/datetime/timestamp fields have a zero-date default. This must be corrected before any character-set and/or collation modifications are made to the database."

    Is there a missing step that I should address, in order to run the tool?
    All help appreciated thanks.
    kevin_a

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

    Default Re: Problem changing all DB collations to utf8mb3_general_ci

    If you have cPanel and phpMyAdmin, select the database, navigate to the "Operations" tab, change the collation to utf8mb4_general_ci, and check the options to change all tables and columns to the new collation. Click on Go.

    Note the use of 4 versus 3.

  3. #3
    Join Date
    Mar 2007
    Location
    Worcester UK
    Posts
    135
    Plugin Contributions
    0

    Default Re: Problem changing all DB collations to utf8mb3_general_ci

    Thanks dbltoe, but that did not make any change.
    Still a mix of latinxxx and utfxxxx?
    kevin_a

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,431
    Plugin Contributions
    94

    Default Re: Problem changing all DB collations to utf8mb3_general_ci

    What is the DB_CHARSET value set in /includes/configure.php?

  5. #5
    Join Date
    Mar 2007
    Location
    Worcester UK
    Posts
    135
    Plugin Contributions
    0

    Default Re: Problem changing all DB collations to utf8mb3_general_ci

    define('DB_TYPE', 'mysql'); // always 'mysql'
    define('DB_PREFIX', ''); // prefix for database table names -- preferred to be left empty
    define('DB_CHARSET', 'utf8mb4'); // 'utf8mb4' or older 'utf8' / 'latin1' are most common
    define('DB_SERVER', 'localhost'); // address of your db server
    kevin_a

  6. #6
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,826
    Plugin Contributions
    0

    Default Re: Problem changing all DB collations to utf8mb3_general_ci

    in phpmyadmin select the check all and in the "with selected" dropdown choose analyze table.
    Default global setting for "information schema stats expiry" is 86400 seconds, so changes are not always apparent immediately until the cache expires (if the server is using MySQL 8.0)
    So you have to force it to invalidate the cache of stats
    Mike
    AEIIA - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  7. #7
    Join Date
    Mar 2007
    Location
    Worcester UK
    Posts
    135
    Plugin Contributions
    0

    Default Re: Problem changing all DB collations to utf8mb3_general_ci

    Thank you barco
    Unfortunately I do not see a button facilitating check/select all tables, ?
    Where in the menu structure or elsewhere should I find it?
    kevin_a

  8. #8
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,826
    Plugin Contributions
    0

    Default Re: Problem changing all DB collations to utf8mb3_general_ci

    when you have your database open in phpmyadmin, scroll to the bottom, and there is the check all to select all tables in your database and then the dropdown is right next to that
    Name:  phpmyadmin.jpg
Views: 31
Size:  11.5 KB
    Mike
    AEIIA - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  9. #9
    Join Date
    Mar 2007
    Location
    Worcester UK
    Posts
    135
    Plugin Contributions
    0

    Default Re: Problem changing all DB collations to utf8mb3_general_ci

    Ok thanks barco
    I ran Analyse selected (all) and the reply was "Table is already up to date" in every case.
    However, structure tab lists mix latin1/ utf8mb3 / utf8mb4 ?
    kevin_a

  10. #10
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,826
    Plugin Contributions
    0

    Default Re: Problem changing all DB collations to utf8mb3_general_ci

    well, that confirms that the "convert_database.php" didn't do the conversion.
    Mike
    AEIIA - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v156 Mixed DB collations: should they all match
    By RixStix in forum General Questions
    Replies: 11
    Last Post: 5 Apr 2020, 04:34 PM
  2. Illegal mix of collations
    By DML73 in forum General Questions
    Replies: 6
    Last Post: 31 Dec 2013, 11:54 PM
  3. Mixed collations in database after upgrade
    By arthurdent in forum Upgrading to 1.5.x
    Replies: 4
    Last Post: 9 Nov 2011, 11:04 PM
  4. 1267 Illegal mix of collations
    By integrity_designs in forum General Questions
    Replies: 2
    Last Post: 8 Sep 2011, 02:59 AM
  5. Need an SQL expert - my collations are illegal!
    By kelvyn in forum General Questions
    Replies: 6
    Last Post: 30 Apr 2007, 01:58 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