Bug #93551 mysql database seems corrupted if forget loading group_replication plugin
Submitted: 11 Dec 2018 5:18 Modified: 15 May 2019 12:29
Reporter: Yoshimi Takahashi Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Documentation Severity:S4 (Feature request)
Version:8.0.13 OS:CentOS (7.3)
Assigned to: CPU Architecture:Any
Tags: group replication

[11 Dec 2018 5:18] Yoshimi Takahashi
Description:
I tried to setup MySQL Group replication refer to reference manual steps:

https://dev.mysql.com/doc/refman/8.0/en/group-replication-configuring-instances.html

But I faced below error when starting mysqld because group_replication is not loaded.

2018-12-11T05:07:58.845576Z 0 [ERROR] [MY-000067] [Server] unknown variable 'group_replication_group_name=d3a3f9aa-3b37-45af-a154-c309a1a169cf'.

So I added below setting in my.cnf, and could start mysqld.

> early-plugin-load="group_replication.so"

However, there are some strange point:

+ initial temporary password for root user is not set
+ mysql database have few tables
+ couldn't execute mysql_upgrade command

It seems that mysql database is corrupted.

How to repeat:
$ sudo rpm -ivh http://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm
$ sudo yum install -y mysql-community-server

$ sudo tee /etc/my.cnf << EOT
[mysqld]
log_error=/var/log/mysqld.log
server_id=10   ### server2=20 / server3=30
gtid_mode=ON
enforce_gtid_consistency=ON
binlog_checksum=NONE
log_bin=binlog
log_slave_updates=ON
binlog_format=ROW
master_info_repository=TABLE
relay_log_info_repository=TABLE
transaction_write_set_extraction=XXHASH64
group_replication_group_name="d3a3f9aa-3b37-45af-a154-c309a1a169cf"
group_replication_start_on_boot=off
group_replication_local_address="192.168.10.101:33061"
group_replication_group_seeds= "192.168.10.101:33061,192.168.10.102:33061,192.168.10.103:33061"
group_replication_bootstrap_group=off
EOT

$ sudo systemctl start mysqld
Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.

$ sudo vi /etc/my.cnf
-> add below setting

+ early-plugin-load="group_replication.so"

$ sudo systemctl start mysqld

$ mysql -u root
-> initial temporary password is not set

mysql> show tables from mysql;
+--------------------+
| Tables_in_mysql    |
+--------------------+
| innodb_index_stats |
| innodb_table_stats |
+--------------------+
2 rows in set (0.01 sec)

-> mysql database seems corrupted

$ sudo mysql_upgrade -u root
Checking if update is needed.
Checking server version.
Error occurred: Query against mysql.user table failed when checking the mysql.session.

-> we couldn't execute mysql_upgrade command

Suggested fix:
I think recommended procedure is to write below setting in my.cnf at first step:

+ early-plugin-load="group_replication.so"
[11 Dec 2018 5:18] Yoshimi Takahashi
error log after reproduce test

Attachment: mysqld.log (application/octet-stream, text), 5.44 KiB.

[11 Dec 2018 5:19] Yoshimi Takahashi
using conf file

Attachment: my.cnf (application/octet-stream, text), 635 bytes.

[9 May 2019 15:44] MySQL Verification Team
Hi,

Thanks for the report. Our documentation do need some improvement.

all best
[15 May 2019 12:30] MySQL Verification Team
Bug #93550 solves this issue