UTF8mb4 MariaDB 10.4 – The maximum key length is an error of 767 bytes

I am running MariaDB 10.4.
I am trying to configure symmetricDS for database synchronization. Some of the tables you create have fields that are VARCHAR (255). I know UTF8mb4 can only support up to VARCHAR (191)

I know that I can configure my database to be UTF8 and this problem disappears. But I understand that it is not the ideal solution. I cannot change the tables / fields that symmetricDS is creating.

I have read some other posts about this as there are many. But I have not seen anything above MariaDB 10.2 that I think I read that things have changed with engines prior to 10.2. So I just want to see if everything is still relevant.

Is there any way this can be resolved, while staying with UTF8mb4?
Or does it even matter and just go to UTF8?

amazon rds: update all columns, tables and MySQL databases from utf8mb3 to utf8mb4

I have thousands of columns in hundreds of tables in approximately one hundred databases within a MySQL instance that need to be updated from utf8mb3 to utf8mb4. Is there any way to generate ALTER statements for each table and column you need to change?

I am updating MySQL hosted on Amazon RDS from MySQL 5.7 to 8.0. The pre-patch compatibility tool tells me:

The following objects use the utf8mb3 character set. It is recommended to convert them to use utf8mb4 instead, to improve Unicode support.

More information:

Then list about 6,000 databases and columns that should be updated:

mydb - schema's default character set: utf8
mydb.mytable.mycolumn - column's default character set: utf8

I wish I could generate all the ALTER I need to execute statements similar to how the MySQL command that queries all MyISAM databases helped me convert all my MyISAM tables to Innodb.

mysql – mariadb utf8 utf8mb4 problem

I upgraded to Debian 9, which changed MySQL 5.5 to Mariadb 10.3

everything works fine, except for this utf8 that produces garbage on html pages that still have meta http-equiv = "Content-type" content = "text / html; charset = utf-8"

I added in /etc/mysql/my.cnf

character set-server = utf8
interleaving-server = utf8_general_ci
character_set_server = utf8
collation_server = utf8_general_ci

mysql reboot
but getting utf8mb4 instead of utf8

mysqladmin var | grep -E & # 39; character | collation & # 39; | tr -s & # 39;
The | character_set_client | utf8mb4 |
The | character_set_connection | utf8mb4 |
The | character_set_database | utf8mb4 |
The | character_set_filesystem | binary |
The | character_set_results | utf8mb4 |
The | character_set_server | utf8mb4 |
The | character_set_system | utf8 |
The | character_sets_dir | / usr / share / mysql / charsets / |
The | collation_connection | utf8mb4_general_ci |
The | collation_database | utf8mb4_general_ci |
The | collation_server | utf8mb4_general_ci |

I have exactly the same database on a Windows PC and
show variables like "character_set%"
character_set_client | utf8
character_set_connection | utf8

What do I need to fix the garbage characters? Thank you

index – Will MariaDB treat the ut8 / utf8mb3 and utf8mb4 collations as compatible?

MySQL and MariaDB are compatible with obsolete ones utf8mb3 set of characters and collations. (utf8 It is currently an alias for utf8mb3.) This supports all Unicode code points in the Basic Multilingual Plane (BMP) and stores on disk using up to 3 bytes.

The most inclusive utf8mb4 The character set supports all Unicode code points (including BMP) that use up to 4 bytes on the disk. (utf8 alias to utf8mb4 in the future.) All storable with utf8mb3 it is stored in the same way (bit by bit) in utf8mb4. Some things storable with utf8mb4 are not storable with utf8mb3.

We have an index definition using the new character set:

user_email VARCHAR(50) CHARACTER SET utfmb4 UNIQUE

and elsewhere have one using the outdated version

email_in_another_table VARCHAR(50) CHARACTER SET utf8 UNIQUE

Will a query that uses the two indexes avoid reading row data (which is slower than the indexes)?

SELECT user_email
  FROM a
 UNION -- this is an intersection
SELECT email_in_another_table
  FROM b

7 – SQL error updating utf8mb4

I have successfully followed the instructions on the Drupal page to update uft8mb4 except for 1 table that shows the following error:


SQL query:

MySQL said: Documentation

#1062 - Duplicate entry 'public://listings/4232.jpg' for key 'uri'

What should I do to complete the update?

The character set & # 39; utf8mb4 & # 39; it is not a compiled character set and is not specified in the file & # 39; /usr/share/mysql/charsets/Index.xml'

Complete error

The character set & # 39; utf8mb4 & # 39; it is not a compiled character set and is not specified in the file & # 39; /usr/share/mysql/charsets/Index.xml'
InvalidArgumentException: There was a problem connecting to the database: SQLSTATE[HY000] [2019]    Unable to initialize the utf8mb4 character set (path: / usr / share / mysql / charsets /)

mysql See 14.14 Distrib 5.7.26

I'm trying to fix this error, but I can not fix it on an active server. I had to go through the procedure of adding the following to the /usr/share/mysql/charsets/Index.xml file in a local virtual machine that worked.

  UTF-8 MB4 Unicode

I have restarted mysql a couple of times since I updated this in vain. My database connection is shown as such

<? php
$ db = new PDO ("mysql: host = $ host; dbname = $ db; charset = utf8mb4", $ db_username, $ db_pass);

And all the variables in my database seem to be verified based on other publications I've seen

enter the description of the image hereenter the description of the image here

my.cnf has the following set also

set of characters-server = utf8mb4
collation-server = utf8mb4_unicode_ci