1

While upgrading mysql from 5.6 -> 5.7 -> 8.0.23 in step 5.7 -> 8.0.23 I got a warning:

The following objects use the utf8mb3 character set. It is recommended to convert them to use utf8mb4 instead, for improved Unicode support.
More Information:
https://dev.mysql.com/doc/refman/8.0/en/charset-unicode-utf8mb3.html

common_schema - schema's default character set: utf8
mysql - schema's default character set: utf8
common_schema._global_qs_functions.function_arguments - column's default character set: utf8
common_schema._global_qs_variables.value_snapshot - column's default character set: utf8
common_schema._global_script_report_data.info - column's default character set: utf8
...

What does schema 'mysql' mean in 'mysql - schema's default character set: utf8'? Is it innodb?

Sviatoslav
  • 15
  • 3

1 Answers1

0

Every MySQL instance has a system schema named mysql that contains tables for system information, like user passwords and privileges, timezones, stored routines, and so on. You can read about it in the manual: https://dev.mysql.com/doc/refman/5.7/en/system-schema.html

What this warning is telling you is that the system schema is defined with a default character set that is not recommended. You can see the default character set this way:

mysql> show create schema mysql;
+----------+-------------------------------------------------------------------+
| Database | Create Database                                                   |
+----------+-------------------------------------------------------------------+
| mysql    | CREATE DATABASE `mysql` /*!40100 DEFAULT CHARACTER SET utf8mb4 */ |
+----------+-------------------------------------------------------------------+

In my case, the default character set of the system schema is utf8mb4.

A schema's default character set has no effect unless you create a new table and do not specify its character set. The default character set of the schema will be used for that table.

(In MySQL, "schema" and "database" are synonyms in most contexts.)

Bill Karwin
  • 538,548
  • 86
  • 673
  • 828
  • Can this be changed? – Thomas Cheng Mar 07 '22 at 10:41
  • 1
    @ThomasCheng https://dev.mysql.com/doc/refman/8.0/en/alter-database.html – Bill Karwin Mar 07 '22 at 15:38
  • Thanks Bill, but actually that command does not work for AWS RDS instances (it works for other MySQL services where you have full control). It will say I'm denied because I do not have the permissions, even if I'm using the "root" admin account. I think the "real root" was never granted to us. – Thomas Cheng Mar 07 '22 at 17:51
  • For reasons like this, I don't use RDS. You'll have to take this up with AWS as a support request. Good luck. – Bill Karwin Mar 07 '22 at 17:59