MariaDB のレプリケーション・スレイブをマスターに昇格させる
「/etc/my.cnf.d/mariadb-server.cnf」の編集
「log_slave_updates」と「read_only」をコメントアウト
[server]
[mysqld]
max_connections = 300
datadir = /var/lib/mysql
socket = /var/lib/mysql/mysql.sock
pid-file = /run/mariadb/mariadb.pid
character-set-server = utf8mb3
max_allowed_packet = 500M
log_bin = on
gtid_domain_id = 1
server_id = 5
binlog_format = ROW
#log_slave_updates = on
#read_only = on
[galera]
[embedded]
[mariadb]
max_connections = 300
datadir = /var/lib/mysql
socket = /var/lib/mysql/mysql.sock
pid-file = /run/mariadb/mariadb.pid
character-set-server = utf8mb3
max_allowed_packet = 500M
log_bin = on
gtid_domain_id = 1
server_id = 5
binlog_format = ROW
#log_slave_updates = on
#read_only = on
[mariadb-10.5]
MariaDB の再起動
# systemctl restart mariadb
スレイブの停止
# mariadb -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 69166
Server version: 10.11.11-MariaDB-log MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> stop all slaves;
Query OK, 0 rows affected, 1 warning (0.002 sec)
MariaDB [(none)]> reset slave all;
Query OK, 0 rows affected (0.000 sec)
MariaDB [(none)]> show all slaves status \G
Empty set (0.000 sec)
MariaDB [(none)]>