0

I am trying my first set up for innodb cluster based on the book 'Introducing InnoDB Cluster Learning the MySQL High Availability Stack' by Charles Bell. While trying to launch the primary node with the line below:

mysqld --defaults-file=primary.cnf > primary_output.txt 2>&1 &

Errors tends to suggest that the applied variables are 'unknown'. What could be happening?

2022-08-22T17:44:30.625389Z 0 [System] [MY-010116] [Server] /usr/local/mysql-8.0.17-macos10.14-x86_64/bin/mysqld (mysqld 8.0.17) starting as process 29191
2022-08-22T17:44:30.629679Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for <home-dir>/gr/data/primary/ is case insensitive
2022-08-22T17:44:30.998523Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2022-08-22T17:44:31.002804Z 0 [Warning] [MY-000067] [Server] unknown variable 'loose-group_replication_recovery_use_ssl=ON'.
2022-08-22T17:44:31.002811Z 0 [Warning] [MY-000067] [Server] unknown variable 'loose-group_replication_group_name=bbbbbbbb-bbbb-cccc-dddd-eeeeeeeeeeee'.
2022-08-22T17:44:31.002817Z 0 [Warning] [MY-000067] [Server] unknown variable 'loose-group_replication_start_on_boot=OFF'.
2022-08-22T17:44:31.002822Z 0 [Warning] [MY-000067] [Server] unknown variable 'loose-group_replication_local_address=127.0.0.1:24901'.
2022-08-22T17:44:31.002827Z 0 [Warning] [MY-000068] [Server] unknown option '--loose-group_replication_group_see'.
2022-08-22T17:44:31.002832Z 0 [ERROR] [MY-000067] [Server] unknown variable 'ds=127.0.0.1:24901,127.0.0.1:24902,127.0.0.1:24903,127.0.0.1:24904'.
2022-08-22T17:44:31.003631Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-08-22T17:44:31.998566Z 0 [System] [MY-010910] [Server] /usr/local/mysql-8.0.17-macos10.14-x86_64/bin/mysqld: Shutdown complete (mysqld 8.0.17)  MySQL Community Server - GPL.

Below are the configurations:

#primary.cnf
[mysqld]
datadir=<home-dir>/gr/data/primary
basedir=/usr/local/mysql-8.0.17-macos10.14-x86_64/
plugin_dir=/usr/lib/mysql/plugin/
port=24801
socket=<home-dir>/gr/primary.sock
server_id=1
gtid_mode=ON
enforce_gtid_consistency=ON
binlog_checksum=NONE
transaction_write_set_extraction=XXHASH64
loose-group_replication_recovery_use_ssl=ON
loose-group_replication_group_name="bbbbbbbb-bbbb-cccc-dddd-eeeeeeeeeeee"
loose-group_replication_start_on_boot=OFF
loose-group_replication_local_address="127.0.0.1:24901"
loose-group_replication_group_see
ds="127.0.0.1:24901,127.0.0.1:24902,127.0.0.1:24903,127.0.0.1:24904"
loose-group_replication_bootstrap_group=OFF


#secondary1.cnf
[mysqld]
datadir=/Users/goremo/gr/data/secondary1
basedir=/usr/local/mysql-8.0.17-macos10.14-x86_64/
plugin_dir=/usr/lib/mysql/plugin/
port=24802
socket=/Users/goremo/gr/secondary1.sock
server_id=2
gtid_mode=ON
enforce_gtid_consistency=ON
binlog_checksum=NONE
loose-group_replication_recovery_get_public_key=ON
loose-group_replication_recovery_use_ssl=ON
loose-group_replication_group_name="bbbbbbbb-bbbb-cccc-dddd-eeeeeeeeeeee"
loose-group_replication_start_on_boot=OFF
loose-group_replication_local_address="127.0.0.1:24902"
loose-group_replication_group_see
ds="127.0.0.1:24901,127.0.0.1:24902,127.0.0.1:24903,127.0.0.1:24904"
loose-group_replication_bootstrap_group=OFF

#secondary2.cnf
[mysqld]
datadir=/Users/goremo/gr/data/secondary2
basedir=/usr/local/mysql-8.0.17-macos10.14-x86_64/
plugin_dir=/usr/lib/mysql/plugin/
port=24803
socket=/Users/goremo/gr/secondary2.sock
server_id=3
gtid_mode=ON
enforce_gtid_consistency=ON
binlog_checksum=NONE
loose-group_replication_recovery_get_public_key=ON
loose-group_replication_recovery_use_ssl=ON
loose-group_replication_group_name="bbbbbbbb-bbbb-cccc-dddd-eeeeeeeeeeee"
loose-group_replication_start_on_boot=OFF
loose-group_replication_local_address="127.0.0.1:24902"
loose-group_replication_group_see
ds="127.0.0.1:24901,127.0.0.1:24902,127.0.0.1:24903,127.0.0.1:24904"
loose-group_replication_bootstrap_group=OFF

#secondary3.cnf
[mysqld]
datadir=/Users/goremo/gr/data/secondary3
basedir=/usr/local/mysql-8.0.17-macos10.14-x86_64/
plugin_dir=/usr/lib/mysql/plugin/
port=24804
socket=/Users/goremo/gr/secondary3.sock
server_id=4
gtid_mode=ON
enforce_gtid_consistency=ON
binlog_checksum=NONE
loose-group_replication_recovery_get_public_key=ON
loose-group_replication_recovery_use_ssl=ON
loose-group_replication_group_name="bbbbbbbb-bbbb-cccc-dddd-eeeeeeeeeeee"
loose-group_replication_start_on_boot=OFF
loose-group_replication_local_address="127.0.0.1:24902"
loose-group_replication_group_see
ds="127.0.0.1:24901,127.0.0.1:24902,127.0.0.1:24903,127.0.0.1:24904"
loose-group_replication_bootstrap_group=OFF

NB: I am using mac Big Sur, mysql v8.0.17

1
  • After removing the 'loose-', I am still getting 2022-08-22T20:57:12.150575Z 0 [ERROR] [MY-000067] [Server] unknown variable 'group_replication_recovery_use_ssl=ON'. But when I check the documentation, I see: group_replication_recovery_use_ssl is valid
    – goremo
    Commented Aug 22, 2022 at 20:58

1 Answer 1

0

Why attempt to set up an InnoDB Cluster manually when you can use MySQL Shell to abstract you from all that complexity?

See https://dev.mysql.com/doc/mysql-shell/8.0/en/deploying-production-innodb-cluster.html

3
  • This was an academic excersise based on the book I have mentioned. I followed the steps on the book but it did not work. Understanding why it did not work would have enabled me to understand the concept better. I have since gone through the book and is aware of the point you have raised. But your point does not answer the specific question raised.
    – goremo
    Commented Dec 8, 2022 at 20:10
  • Fair enough. OK, some general comments: 1) You don't need to use the 'loose-' variables. Just install the GR plugin on each server beforehand: INSTALL PLUGIN group_replication SONAME 'group_replication.so'; 2) You need to bootstrap the group in the server you want to become the primary. For that, you must set group_replication_bootstrap_group=ON Commented Dec 9, 2022 at 11:28
  • Thanks. Will try and test the changes and revert.
    – goremo
    Commented Dec 9, 2022 at 19:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.