Upgrading from mariadb 10.11.8 to 11.4.5 gives warning about ERROR 1267 Illegal mix of collations
0
votes
3
answers
193
views
As title says I upgraded my mariadb, all fine and no issues, ran mariadb-upgrade and all fine but now every time i start mariadb I see this errors
Mar 27 03:38:42 db3 debian-start: SELECT count(*) FROM mysql.user WHERE user='root' and password='' and password_expired='N' and plugin in ('', 'mysql_native_password', 'mysql_old_password')
Mar 27 03:38:42 db3 debian-start: --------------
Mar 27 03:38:42 db3 debian-start: ERROR 1267 (HY000) at line 1: Illegal mix of collations (utf8mb4_general_ci,COERCIBLE) and (utf8mb4_unicode_520_ci,COERCIBLE) for operation '='
I have tried changing the mysql.global_priv already and even tried to run this
ALTER TABLE mysql.user CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;
But it gives an error
/* SQL Error (1347): 'mysql.user' is not of type 'BASE TABLE' */
This works fine but doesn't fix the issue
TABLE mysql.global_priv CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;
Confirmation of the defaults being loaded at start
mysqld would have been started with the following arguments:
--socket=/run/mysqld/mysqld.sock --pid-file=/run/mysqld/mysqld.pid --basedir=/usr --skip-name-resolve --bind-address=0.0.0.0 --port=REDACTED --collation-server=utf8mb4_unicode_520_ci --init-connect=init-connect=SET NAMES utf8mb4 COLLATE utf8mb4_unicode_520_ci --character-set-server=utf8mb4 --character-set-client-handshake=FALSE --skip-character-set-client-handshake=1 --key_buffer_size=2G --myisam_sort_buffer_size=16M --max_allowed_packet=256M --myisam-recover-options=BACKUP --max_length_for_sort_data=8192 --expire_logs_days=7 --max_binlog_size=100M --max_connections=39000 --max_user_connections=38990 --wait_timeout=10 --back_log=4096 --max_connect_errors=4096 --table_open_cache=40000 --table_definition_cache=40000 --tmp_table_size=1G --max_heap_table_size=1G --innodb_buffer_pool_size=32G --innodb_log_file_size=8G --innodb_read_io_threads=64 --innodb_write_io_threads=64 --innodb_thread_concurrency=0 --innodb_flush_log_at_trx_commit=0 --innodb_flush_method=O_DIRECT --performance_schema=OFF --innodb-file-per-table=1 --innodb_io_capacity=2000 --innodb_table_locks=0 --innodb_lock_wait_timeout=50 --innodb_deadlock_detect=ON --query_cache_limit=0 --query_cache_size=0 --query_cache_type=0 --sql-mode=NO_ENGINE_SUBSTITUTION --log_error=/var/lib/mysql/mysql_error.log --log_queries_not_using_indexes=0 --long_query_time=5 --slow_query_log=1 --slow_query_log_file=/var/lib/mysql/mysql_slow.log --event_scheduler=ON --performance_schema_max_file_handles=999999
My show create table
CREATE TABLE global_priv
(
Host
CHAR(255) NOT NULL DEFAULT '' COLLATE 'utf8mb4_unicode_520_ci',
User
CHAR(128) NOT NULL DEFAULT '' COLLATE 'utf8mb4_unicode_520_ci',
Priv
LONGTEXT NOT NULL DEFAULT '{}' COLLATE 'utf8mb4_unicode_520_ci',
PRIMARY KEY (Host
, User
) USING BTREE
)
COMMENT='Users and global privileges'
COLLATE='utf8mb4_unicode_520_ci'
ENGINE=Aria
;
I don't know what else to do. This doesn't seem to cause issues when connecting but it's annoying and also seems related to this issue here that had no solution
https://dba.stackexchange.com/questions/339213/mariadb-cant-enforce-charset-and-collation-to-clients
Anyone knows how to fix this?
Asked by Freedo
(208 rep)
Mar 27, 2025, 09:36 AM
Last activity: Jun 12, 2025, 05:50 PM
Last activity: Jun 12, 2025, 05:50 PM