unknow collation: ‘utf8mb4_0900_ai_ci’

Hi!
Good day.
How can I import the version 14.2 database into a local environment?
MySQL send error unknow collation: ‘utf8mb4_0900_ai_ci’
Please can help me.
Thanks!

Parents Reply
  • Just to confirm from  message did you upgrade you local MySQL to v8 prior to running that script? I ran into the same issue as you and I had to backup all my development instances, fully uninstall the previous MySQL and install v8.0.41. I should also point out that if you're installing using brew make sure to specify 8.0 (mysql@8.0) as it will by default install 9.2 which isn't supported.

Children
  • I have 8.2.12 version of MySQL without Brew

  • Perfect! If you're restoring version 14.2 to MySQL 8.2, you won’t need to run the script since MySQL 8.2 supports utf8mb4_0900_ai_ci. Did the original error occur when you attempted to restore the 14.2 database to the upgraded MySQL?

  • That’s very odd since MySQL 8.2 fully supports utf8mb4_0900_ai_ci. As long as you're restoring the same original .sql files from your backup, it should work without issues.

    The only problem I ran into after upgrading was ensuring that nothing from MySQL 5.7 was still running. Have you verified this by running mysql -v to confirm that MySQL 8.2 is actually active?

    I know Sugar officially supports MySQL 8.0.31, but I can’t see why 8.2 would have this issue. I’m currently running 8.0.41 and have successfully restored multiple client instances without any problems.

    One thing had to do was fully uninstall MySQL 5.7, flushing out any lingering my.cnf files, and ensuring a clean install of MySQL 8.0.41. Leftover configuration files caused issues for me during my upgrade. I also backed up all the databases I had, flushed out the database folders before installing a fresh MySQL.

    I just get the feeling that something is lingering as you shouldn't be have an issue with 8.2 and utf8mb4_0900_ai_ci.

    Can you try running

    SHOW COLLATION LIKE 'utf8mb4_0900_ai_ci';

    also 

    SHOW CHARACTER SET LIKE 'utf8mb4';

    Here is an image of mine

    share.cleanshot.com/6b8YlRKB

  • The version is correct 8.2 of MySQL

    SHOW COLLATION LIKE 'utf8mb4_0900_ai_ci'; no return records and 

    SHOW CHARACTER SET LIKE 'utf8mb4'; shows the following:

    utf8mb4 UTF-8 Unicode utf8mb4_general_ci 4
  • Hey, 

    Can you confirm this was an upgrade you did? I am asking as I am getting the feeling your system is using legacy collation settings from an older version.

    If you run SHOW COLLATION WHERE Charset = 'utf8mb4'; and utf8mb4_0900_ai_ci is missing then there is good chances your missing other collations needed.

    If you run SELECT @@collation_database, @@collation_server; and if it returns utf8mb4_general_ci try changing them using

    SET GLOBAL collation_server = 'utf8mb4_0900_ai_ci';

    SET GLOBAL character_set_server = 'utf8mb4';

    Then restart MySQL

    There is more you could do after this by checking your my.cnf or my.ini BUT personally I would consider uninstall, remove the my.cnf/ini and doing a clean re-install.

  • When run SET GLOBAL collation_server = 'utf8mb4_0900_ai_ci'; send next Error Code: 1273. Unknown collation: 'utf8mb4_0900_ai_ci'

  • Ok, if it's me I am uninstalling, making sure the my.cnf/ini are gone and then re-installing. What are you installing on? Windows or Linux/Ubuntu?

    What does SHOW VARIABLES LIKE "version_comment"; show you?

  •  it seems like  's MySQL 8.2 has been upgraded in place or something along those lines. I did install MySQL 8.2 (through docker) and it does have that collation and I managed to import a SugarCloud cloud 14.2 backup to my local environment without issues.

    My suggestion is to  work with his DBA team to have that collation installed (if that's a thing) or simply use containers for this by using our SugarDockerized as his local development environment.

    SugarCRM | Principal Developer Advocate

  • It's new install on windows

    SHOW VARIABLES LIKE "version_comment";

    mariadb.org binary distribution