MySQL初始化之后启动报错(mysqld: Table ‘mysql.plugin‘ doesn‘t exist)

报错场景

初始化之后,服务无法启动。错误日志error-log 报错如下:(mysql库下的系统表不存在)

2023-10-26T06:03:08.150163-00:00 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-10-26T06:03:08.496623-00:00 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
mysqld: Table 'mysql.plugin' doesn't exist
2023-10-26T06:03:09.141007-00:00 0 [ERROR] [MY-010735] [Server] Could not open the mysql.plugin table. Please perform the MySQL upgrade procedure.
2023-10-26T06:03:09.141244-00:00 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2023-10-26T06:03:09.141429-00:00 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2023-10-26T06:03:09.141599-00:00 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2023-10-26T06:03:09.141826-00:00 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2023-10-26T06:03:09.141960-00:00 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2023-10-26T06:03:09.142082-00:00 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2023-10-26T06:03:09.142198-00:00 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2023-10-26T06:03:09.471237-00:00 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2023-10-26T06:03:09.593702-00:00 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2023-10-26T06:03:09.597026-00:00 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2023-10-26T06:03:09.597086-00:00 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2023-10-26T06:03:09.692911-00:00 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2023-10-26T06:03:09.693231-00:00 0 [ERROR] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-001146 - Table 'mysql.component' doesn't exist
2023-10-26T06:03:09.693248-00:00 0 [Warning] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-003543 - The mysql.component table is missing or has an incorrect definition.
2023-10-26T06:03:09.693314-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_rpl_semi_sync_master_enabled=1'.
2023-10-26T06:03:09.693319-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_rpl_semi_sync_slave_enabled=1'.
2023-10-26T06:03:09.693323-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_rpl_semi_sync_master_timeout=30000'.
2023-10-26T06:03:09.693326-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_rpl_semi_sync_master_wait_for_slave_count=1'.
2023-10-26T06:03:09.693329-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_rpl_semi_sync_master_wait_no_slave=0'.
2023-10-26T06:03:09.693331-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_clone=FORCE_PLUS_PERMANENT'.
2023-10-26T06:03:09.693606-00:00 0 [ERROR] [MY-010326] [Server] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
2023-10-26T06:03:09.693646-00:00 0 [ERROR] [MY-010952] [Server] The privilege system failed to initialize correctly. For complete instructions on how to upgrade MySQL to a new version please see the 'Upgrading MySQL' section from the MySQL manual.
2023-10-26T06:03:09.693723-00:00 0 [ERROR] [MY-010119] [Server] Aborting
2023-10-26T06:03:11.193205-00:00 0 [System] [MY-010910] [Server] /data/mysql/4407/base/bin/mysqld: Shutdown complete (mysqld 8.0.32)  MySQL Community Server - GPL.

在这里插入图片描述

问题要点

系统表 不存在,数据库刚进行完初始化呀,不合理呀?

# 初始化数据库
/data/mysql/3306/base/bin/mysqld --defaults-file=/data/mysql/3306/my.cnf.3306 --initialize-insecure --user=mysql
  • 排出了目录权限问题

问题原因和处理方式

  • 半同步插件的参数在初始化的时候不能开启
  • 处理方式是注释掉 下面参数,重新初始化。
# Semisync config 
#plugin-load                                             = "rpl_semi_sync_source=semisync_source.so;rpl_semi_sync_replica=semisync_replica.so"
#rpl_semi_sync_source_enabled                            = 1
#rpl_semi_sync_replica_enabled                           = 1                

完结撒花。

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值