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.解压在自己建的目录(各 ...
随机推荐
- MVC(实战一)
一.创建MVC项目 二.界面分布 Content:是存放css文件等,暂时先不考虑. Controllers:重要, 控制层,控制界面显示和界面逻辑的,其实真正业务逻辑层,建议分层出去. Models ...
- 你必须知道的Dockerfile
本篇已加入<.NET Core on K8S学习实践系列文章索引>,可以点击查看更多容器化技术相关系列文章. 一.关于Dockerfile 在Docker中创建镜像最常用的方式,就是使用D ...
- JS-正则表达式解析
正则表达式通常用于输入校验,用法示例为 if (!(/^1[345789]\d{9}$/.test($('.tel').val()))) { $.toast("手机号格式有误", ...
- java中窗口的打开与关闭
作为小白的我,今天学习了java中打开与关闭窗口的方法. 1.在java中创建一个窗口 import java.awt.*;import java.awt.event.*;public class L ...
- Mac PyCharm2019激活码
此教程支持最新2019.2版本Pycharm及其他软件 此教程实时更新,请放心使用:如果有新版本出现猪哥都会第一时间尝试激活: pycharm官网下载地址:http://www.jetbrains.c ...
- SpringBoot整合MyBatis-Plus3.1详细教程
作者:Sans_ juejin.im/post/5cfa6e465188254ee433bc69 一.说明 Mybatis-Plus是一个Mybatis框架的增强插件,根据官方描述,MP只做增强不做改 ...
- 在nodejs中怎么使用redis缓存组件
redis量个强大的缓存组件,可以部署在windows和linux环境之上,它有五大存储结构,其中有一种为列表list,它可以实现quene和stack的功能,即队列和堆栈的功能. 当然使用先安装py ...
- django js 实现表格动态标序号
<table class="table table-striped"> <thead> <tr class="key_words_head& ...
- JupyterLab安装与配置虚拟环境
JupyterLab安装: 推荐使用miniconda,相比于anaconda更加简洁,下载连接:https://mirrors.tuna.tsinghua.edu.cn/anaconda/minic ...
- Mongodb介绍(非原创)
文章大纲 一.什么是nosql二.mongodb与mysql比较三.参考文章 一.什么是nosql 1. 简介 这一类数据库主要会使用到一个哈希表,这个表中有一个特定的键和一个指针指向特定的数据. ...