MySQL-8.0.18 引入了破坏性变更
MySQL-8.0.18 引入了破坏性变更
变更日志里面有这样一项
When the server is run with --initialize, there is no reason to load non-early plugins. The server now logs a warning and ignores
any --plugin-load or --plugin-load-add options given with --initialize. (Bug #)
也就是说当我们在做初始化的时,像半同步插件这样的非必要插件是不会被加载的,一旦我们在配置文件中加入了相应的配置项,整个初始化就会失败。
场景再现
配置文件(关键部分)
[mysqld]
## replication
rpl_semi_sync_master_enabled = 1
rpl_semi_sync_slave_enabled = 1
rpl_semi_sync_master_timeout = 1000
rpl_semi_sync_master_wait_point = AFTER_SYNC
rpl_semi_sync_master_wait_no_slave = ON
rpl_semi_sync_master_wait_for_slave_count = 1
master_info_repository = table
sync_master_info = 10000
skip_slave_start = OFF
slave_load_tmpdir = /tmp/
plugin_load_add = semisync_master.so
plugin_load_add = semisync_slave.so
初始化命令
/usr/local/mysql-8.0.-linux-glibc2.-x86_64/bin/mysqld --defaults-file=/etc/my-.cnf --initialize --user=mysql3307
错误日志
--17T09::53.905909+: [System] [MY-] [Server] /usr/local/mysql-8.0.-linux-glibc2.-x86_64/bin/mysqld (mysqld 8.0.) initializing of server in progress as process --17T09::56.474963+: [Warning] [MY-] [Server] Ignoring --plugin-load[_add] list as the server is running with --initialize(-insecure).
--17T09::57.620921+: [ERROR] [MY-] [Server] unknown variable 'rpl_semi_sync_master_enabled=1'.
--17T09::57.621099+: [ERROR] [MY-] [Server] The designated data directory /database/mysql/data// is unusable. You can remove all files that the server added to it.
--17T09::57.621375+: [ERROR] [MY-] [Server] Aborting
--17T09::58.676973+: [System] [MY-] [Server] /usr/local/mysql-8.0.-linux-glibc2.-x86_64/bin/mysqld: Shutdown complete (mysqld 8.0.) MySQL Community Server - GPL.
--17T09::59.113521+: [System] [MY-] [Server] /usr/local/mysql-8.0.-linux-glibc2.-x86_64/bin/mysqld (mysqld 8.0.) starting as process
mysqld: Table 'mysql.plugin' doesn't exist
--17T09::59.941092+: [ERROR] [MY-] [Server] Could not open the mysql.plugin table. Please perform the MySQL upgrade procedure.
--17T09::00.013579+: [Warning] [MY-] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
解决方案
方案一:由变更日志中提到的内容可以知道,我们只要在初始化时把非必要插件的内容从配置文件中去掉,初始化完成之后再加回来就行了。然而就要求 dba 特别能吃苦,特别能受累。
方案二:使用 dbm-agent 这个自动化工具,它已经对 MySQL-8.0.18 做了兼容,而且整个安装、配置、调优 过程一行命令解决
# 一行命令完成安装、配置、调优
dbma-cli-single-instance --pkg=mysql-8.0.-linux-glibc2.-x86_64.tar.xz --port= --max-mem= install
验证一下
mysql> select @@version;
+-----------+
| @@version |
+-----------+
| 8.0. |
+-----------+
row in set (0.00 sec) mysql> show plugins;
+---------------------------------+----------+--------------------+--------------------+---------+
| Name | Status | Type | Library | License |
+---------------------------------+----------+--------------------+--------------------+---------+
|
| rpl_semi_sync_master | ACTIVE | REPLICATION | semisync_master.so | GPL |
| rpl_semi_sync_slave | ACTIVE | REPLICATION | semisync_slave.so | GPL |
| clone | ACTIVE | CLONE | mysql_clone.so | GPL |
+---------------------------------+----------+--------------------+--------------------+---------+
rows in set (0.00 sec)
dbm-agent
dbm-agent 是一个开源的自动化工具,可以在 github 上看到到 https://github.com/Neeky/dbm-agent
文章转载自:https://www.sqlpy.com/blogs/books/1/chapters/13/articles/109
---
MySQL-8.0.18 引入了破坏性变更的更多相关文章
- win10 安装mysql 8.0.18 解决Navicat初次连接报错
win10 安装mysql 8.0.18 解决Navicat初次连接报错 win10 安装mysql 8.0.18-winx64 一,先去官网下载mysql 安装包 https://dev.mysql ...
- mysql 8.0.18 hash join测试(内外网首文)
CREATE TABLE COLUMNS_hj as select * from information_schema.`COLUMNS`; INSERT INTO COLUMNS_hj SELECT ...
- mysql 8.0.18 mgr 搭建及其切换
mysql 8.0.18 mgr 搭建及其切换 一.系统安装包 yum -y install make gcc-c++ cmake bison-devel ncurses-devel readline ...
- mysql 8.0.18 手工安装记录
mysql 8.0.18 手工安装记录 为了日常方便,特记录如下. 一.安装系统依赖包 #.系统依赖包安装 yum -y install make gcc-c++ cmake bison-devel ...
- MySQL 8.0.18安装教程(windows 64位)
目录 1-先去官网下载点击的MySQL的下载 2-配置初始化的my.ini文件的文件3-初始化MySQL4-安装MySQL服务 + 启动MySQL 服务5-连接MySQL + 修改密码 * 第一项 ...
- MySQL 8.0.18 在 Windows Server 2019 上的安装(ZIP)公开
AskScuti MySQL : Windows Server 2019 安装 MySQL 8.0 温馨提示:为了展现我最“魅力”的一面,请用谷歌浏览器撩我. 一切就绪,点我开撩
- MySQL 8.0.18 在 Windows Server 2019 上的安装(MSI)公开
AskScuti MySQL : Windows Server 2019 安装 MySQL 8.0 温馨提示:为了展现我最“魅力”的一面,请用谷歌浏览器撩我.那个 IE 啊,我很无奈. 一切就绪,点我 ...
- MySQL 8.0.18 InnoDB Cluster 主从(MGR)完整安装配置
提示: MySQL InnoDB Cluster底层依赖Group Replication模式,至少3台机器 1. 准备3台 CentOS Linux 7 (Core), 修改各主机名:db-hos ...
- mysql 8.0.18 小白安装教程
1. 下载 官网下载:https://dev.mysql.com/downloads/mysql/ 嫌官网网速慢可以加q群,在群文件里下载: 1.下载第一个download 2.解压在自己建的目录(各 ...
随机推荐
- 逆向学习周记-C语言空函数
实验环境:WIN7虚拟机 软件:VC6 首先在VC6里面写一个空函数Fun(): F7编译运行一下,没有出错,接着在函数处使用F9下断点,使程序运行到Fun函数时停下. 接着F5开始运行这个程序 程序 ...
- 2019-2020-1 20199305《Linux内核原理与分析》第九周作业
进程的切换和一般执行过程 (一)进程调度的时机 (1)关键问题 何为进程切换?就是进程调度时机到来时从就绪进程队列中能够挑选一个进程执行,占用CPU时间,那么就有两个关键问题:一是什么时间去挑选一个就 ...
- IT兄弟连 HTML5教程 CSS3揭秘 CSS常见的样式属性和值1
CSS中的样式属性比较多,经常使用的属性可以分为这么几类:字体.文本.背景.位置.边框.列表,以及其他一些样式属性.每个类中的属性都可以单独使用:如果同一个类中多个属性一起使用,还可以将它们整合为一行 ...
- 解决spark dataframe get 报空指针异常 java.lang.NullPointerException
Spark 编程读取hive,hbase, 文本等外部数据生成dataframe后,一般我们都会map遍历get数据的每个字段,此时如果原始数据为null时,如果不进行判断直接转化为string,就会 ...
- ZooKeeper(六):watch机制的原理与实现
因为ZK有watch机制,可以随时发现一些数据的变化,从而达到数据的及时性. ZK的所有读操作都可以设置watch监视点: getData, getChildren, exists. 写操作则是不能设 ...
- 干货:.net core实现读取appsettings.json配置文件(建议收藏)
看好多人不懂在.NET CORE中如何读取配置文件,我这里分两篇,这一篇介绍怎样通过appsettings.json配置读取文件信息.这里我会教大家两种方式: 第一种直接放到通用类库,那里想调往那调. ...
- mysql定时任务(event事件)
1.事件简介 事件(event)是MySQL在相应的时刻调用的过程式数据库对象.一个事件可调用一次,也可周期性的启动,它由一个特定的线程来管理的,也就是所谓的“事件调度器”. 事件和触发器类似,都是在 ...
- c语言内存
冯诺依曼结构是:数据和代码放在一起. 哈佛结构是:数据和代码分开存在.内存管理fiLO 先进后出 栈FIFO 先进先出 队列栈的特点是入口即出口,另一个口是堵死的,所以先进去的后出来队列的特点是入口和 ...
- 漏洞扫描与分析-Nessus-8.7.2最新版-安装-部署-使用
漏洞扫描与分析-Nessus 2019/10/10 Chenxin 简介 官网 https://zh-cn.tenable.com/ 产品 https://zh-cn.tenable.com/prod ...
- IDEA中GitLab的使用
首先安装git https://git-scm.com/downloads/ 下载对应的版本 下载好了,安装打开 Windows. 打开之后2步走,与git连接 首先选择仓库,进行git init本地 ...