← Back to team overview

maria-discuss team mailing list archive

Re: clean MDB 10.4.7 install fails `mysql_upgrade` with FATAL ERROR: "Illegal mix of collations (utf8mb4_unicode_ci, COERCIBLE) and (utf8mb4_general_ci, COERCIBLE) for operation 'like'"

 

> my config includes
> 
> 	cat /usr/local/etc/mariadb/my.cnf
> 
> 		[client]
> 		default-character-set = utf8mb4
> 		...
> 
> 		[mysqld]
> 		init-connect          = 'SET NAMES utf8mb4'
> 		collation-server      = utf8mb4_unicode_ci
> 		character-set-server  = utf8mb4
> 		...
> 
> 		[mysql]
> 		default-character-set = utf8mb4
> 		...


Can't say anything about the particular bug (haven’t touched 10.4.x yet), but wanted to comment on your configuration. If everything is UTF8 imo a more simple way to "force" particular character set is to do this way:

[mysqld]
character-set-server = utf8mb4
collation-server  = utf8mb4_unicode_ci
skip-character-set-client-handshake


So the server ignores what the clients sends and you don't need to do 'SET NAMES .. ' on every connect (for example on older php versions/mysql binaries the default charset was 'latin1' and if the programmer forgot to add 'set names' query could mess up the db).

rr



Follow ups

References