MariaDB binary logging and master-master replication

I am trying to set up MariaDB master-master replication on a Debian server.

Server version: 10.3.25-MariaDB-0+deb10u1 Debian 10.

I have read many tutorials and all of them says it´s necessary to edit `my.cnf` file. Probably all the tutorials are outdated because `my.cnf` file on my server contains only 1 line:

!includedir /etc/mysql/conf.d/

Directory `/etc/mysql/conf.d/` also contains only 1 file mysq.cnf with 1 line:

[mysql]

I found that all settings are in: `/etc/mysql/mariadb.conf.d/50-server.cnf` file

So, I started to set up the first server and added the following lines to `50-server.cnf` file as described [here][1], [here][2] and in other tutorials:

SERVER 1

bind-address = 127.0.0.1,SECOND_SERVER_IP_ADDRESS server-id = 1 log-bin auto_increment_increment = 5 auto_increment_offset = 1 replicate-ignore-db = mysql replicate-ignore-db = information_schema replicate-ignore-db = performance_schema

create user 'repli'@'%' identified by 'password'; grant replication slave on *.* to 'repli'@'%'; FLUSH PRIVILEGES;

show master status; MariaDB [(none)]> show master status; Empty set (0.000 sec)

show binary logs; ERROR 1381 (HY000): You are not using binary logging

I tried different settings to enable binary logging:

log-bin=mysql-bin log_bin= /var/log/mysql/mariadb-bin log_bin=/var/log/mysql/log.bin

etc

`/var/log/mysql` directory of course exists:

drwxr-s--- 2 mysql adm 4096 Oct 30 10:19 mysql

I restart MariaDB, but none of the settings give any effect - I am still getting messaage "You are not using binary logging".

What I am doing wrong?

[1]: http://msutic.blogspot.com/2015/02/mariadbmysql-master-master-replication.html [2]: http://woshub.com/configure-mariadb-replication/

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.