Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7494199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T17:22:30+00:00 2026-05-29T17:22:30+00:00

All the tables are in utf_unicode_ci . I’ve done this to check SELECT table_schema,

  • 0
  1. All the tables are in utf_unicode_ci.

    I’ve done this to check

    SELECT table_schema, table_name, column_name, character_set_name, collation_name
        FROM information_schema.columns
    WHERE collation_name <> 'utf8_unicode_ci' AND table_schema LIKE 'my_database'
        ORDER BY table_schema, table_name, ordinal_position;
    

    And converted every table just in case

    ALTER TABLE `my_database`.`table_name` DEFAULT COLLATE utf8_unicode_ci;      
    ALTER TABLE `my_database`.`table_name` CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;         
    
  2. My database collation settings are in utf8_unicode_ci.

    charsets are

    mysql> show variables like 'char%';
    +--------------------------+----------------------------+
    | Variable_name            | Value                      |
    +--------------------------+----------------------------+
    | character_set_client     | utf8                       |
    | character_set_connection | utf8                       |
    | character_set_database   | utf8                       |
    | character_set_filesystem | binary                     |
    | character_set_results    | utf8                       |
    | character_set_server     | utf8                       |
    | character_set_system     | utf8                       |
    | character_sets_dir       | /usr/share/mysql/charsets/ |
    +--------------------------+----------------------------+
    8 rows in set (0.02 sec)

    collations are

    mysql> show variables like 'colla%';
    +----------------------+-----------------+
    | Variable_name        | Value           |
    +----------------------+-----------------+
    | collation_connection | utf8_unicode_ci |
    | collation_database   | utf8_unicode_ci |
    | collation_server     | utf8_unicode_ci |
    +----------------------+-----------------+
    3 rows in set (0.00 sec)
  3. the error is triggered whether I call the stored procedure via web browser or via mysql bash client. just in case my ubuntu/linux locale settings are:

    $ locale
    LANG=es_ES.UTF-8
    LANGUAGE=es_ES.UTF-8
    LC_CTYPE=es_ES.UTF-8
    LC_NUMERIC="es_ES.UTF-8"
    LC_TIME="es_ES.UTF-8"
    LC_COLLATE=es_ES.UTF-8
    LC_MONETARY="es_ES.UTF-8"
    LC_MESSAGES=es_ES.UTF-8
    LC_PAPER="es_ES.UTF-8"
    LC_NAME="es_ES.UTF-8"
    LC_ADDRESS="es_ES.UTF-8"
    LC_TELEPHONE="es_ES.UTF-8"
    LC_MEASUREMENT="es_ES.UTF-8"
    LC_IDENTIFICATION="es_ES.UTF-8"
    LC_ALL=

The only way I’ve been able to solve this issue is using convert inside each query that causes the error (or using COLLATE inside the query), but the problem is that there are a lot of quite complex stored procedures so it’s hard to identify the “bad” queries and takes a lot of time.

I guess that somehow the variables passed to the stored procedure from my system (ubuntu : mysql client, browser), are being sent in utf8_general_ci, so it makes conflict with ut8_unicode_ci from my database.

It seems that the os is working with utf8_general_ci even though the mysql connection is set to utf_unicode_ci.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T17:22:31+00:00Added an answer on May 29, 2026 at 5:22 pm

    I solved my problem, and was due to a wrong conversion during migration, I was converting to utf_general_ci instead of utf8_unicode_ci, so though the mysql database structure was correct the source data was encoded in the wrong encoding (utf8_general_ci) and inserted in the mysql ddbb that way.

    So the thing is that you can have the right character set and collation in your mysql database and still get this “Illegal mix of collations” error, because of the data is enconded with another collation.

    Hope this helps to somebody in the future.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following query (all tables are innoDB) INSERT INTO busy_machines(machine) SELECT machine
How can I drop all tables whose names begin with a given string? I
Can we find all tables in the msaccess using sql . as we do
I need to get a list of all tables that are published for replication
How can I empty the contents of all tables in my database in phpMyAdmin
Is there a way to get the count of rows in all tables in
I'm looking for a Unix shell script that will truncate all tables in a
I am writing an install script that installs all tables, stored procedures, views, full
Basically I need to reset Identity Increment for all tables to its original. Here
How can I replace CHAR with VARCHAR2 in all tables in a schema? Note:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.