mysql 8 collation issues

(5 posts) (2 voices)

Tags:

No tags yet.

  1. duane, Member

    Hi. After updating to msyql 8 reports reporting an illegal collation error between utf8mb4_general_ci and utf8mb4_0900_ai_ci which was introduced in mysql 8. The problem seems to be caused because the mysql client connect (mysqli/pdo) is not setting a collation and thus it defaults to utf8mb4_0900_ai_ci - but with tables and fields all utf8mb4_general_ci - this raises an error. See details at https://www.percona.com/blog/differing-mysql-client-versions-causing-broken-replication-and-collations-in-aurora/

    Is there a way to set the client connection collation from mydbr to be utf8mb4_general_ci?

  2. myDBR Team, Key Master

    We can take a look at this.

    --
    myDBR Team

  3. myDBR Team, Key Master

    Duane,
    with the latest build, you can now add:


    define( "DB_CHARSET", 'utf8mb4' );
    define( "DB_COLLATION", 'utf8mb4_general_ci' );

    To the mydbr_config.php. This will set the collation fot the myDBR connection.

    --
    myDBR Team

  4. duane, Member

    Thanks - I'll check this out and see if it solves my issues!

  5. duane, Member

    Hi! So an update: this didn't solve my issue but is nice to have.

    As mentioned in the original report, the issue wasn't a myDBR issue, but was affecting my myDBR installation (breaking my custom reports). From what I can tell, the mysql drivers for php might be hard coding the utf8mb4_0900_ai_ci collation...it could also be related to the mysql install I am using (AWS RDS mysql instance which under-the-hood seems to be mariadb)

    I did solve the issue by setting up a new RDS database and migrating ALL data, reports, procedures, etc. to the new instance without carrying the collation over - so all tables, columns, indexes, reports and procedures were recreated with the utf8mb4_0900_ai_ci collation.

    Only this solved my errors! Hope this helps others if they come across it.


Reply

You must log in to post.