在日志文件中的“数据字典升级”之后,MySQL 8将无法启动

问题描述 投票:1回答:1

我正在运行MySQL 8,它突然决定关机,当我尝试重新启动它时不会再回来。

在日志中,我可以看到此事件是原因。

但是,我不知道这意味着什么?或者为什么这会突然发生?

2019-04-25T06:36:58.622078Z 0 [Warning] [MY-010909] [Server] /usr/sbin/mysqld: Forcing close of thread 86  user: 'root'.
2019-04-25T06:37:01.363106Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.15)  MySQL Community Server - GPL.
2019-04-25T06:37:04.074285Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.16) starting as process 26628
2019-04-25T06:37:04.077268Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2019-04-25T06:37:04.077300Z 0 [Warning] [MY-013244] [Server] --collation-server: 'utf8_unicode_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead.
2019-04-25T06:37:04.084875Z 0 [Warning] [MY-012363] [InnoDB] innodb-page-size has been changed from the default value 16384 to 65536.
2019-04-25T06:37:14.212106Z 1 [System] [MY-011090] [Server] Data dictionary upgrading from version '80014' to '80016'.
2019-04-25T06:37:15.910395Z 1 [ERROR] [MY-013178] [Server] Execution of server-side SQL statement 'UPDATE mysql.index_partitions ip JOIN mysql.tablespaces ts ON ts.id = ip.tablespace_id JOIN mysql.table_partitions p ON p.id = ip.partition_id JOIN mysql.tables t ON t.id = p.table_id JOIN mysql.indexes i ON i.table_id = t.id SET ts.options=CONCAT(IFNULL(ts.options,''), IF(LOWER(GET_DD_PROPERTY_KEY_VALUE(t.options,'encrypt_type'))='y' , 'encryption=Y;','encryption=N;')) WHERE t.tablespace_id IS NULL AND i.tablespace_id IS NULL AND p.tablespace_id IS NULL AND ts.engine='InnoDB' AND GET_DD_PROPERTY_KEY_VALUE(t.options,'encrypt_type') IS NOT NULL AND GET_DD_PROPERTY_KEY_VALUE(ts.options,'encryption') IS NULL ' failed with error code = 1267, error message = 'Illegal mix of collations (utf8_general_ci,COERCIBLE) and (utf8_unicode_ci,COERCIBLE) for operation '=''.
2019-04-25T06:37:15.988488Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2019-04-25T06:37:15.988789Z 0 [ERROR] [MY-010119] [Server] Aborting
2019-04-25T06:37:17.250580Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.16)  MySQL Community Server - GPL.
mysql mysql-error-1064 mysql-8.0
1个回答
4
投票

在my.cnf中将“utf”替换为“utf8mb4”并重启mysql。

例如我的mysql配置

[client]
default-character-set=utf8mb4

[mysql]
default-character-set=utf8mb4

[mysqld]
collation-server = utf8mb4_unicode_ci
character-set-server = utf8mb4

more reading

© www.soinside.com 2019 - 2024. All rights reserved.