0

I've created a replication account on a master(server1) and client(server2). This is the output of SHOW GRANTS FOR 'repl'@'192.168.1.%'; on a master;

GRANT REPLICATION SLAVE, BINLOG MONITOR, REPLICATION MASTER ADMIN ON *.* TO `repl`@`192.168.1.%` IDENTIFIED BY PASSWORD '*passhash'

and on a slave:

GRANT REPLICATION SLAVE, BINLOG MONITOR ON *.* TO `repl`@`192.168.1.%` IDENTIFIED BY PASSWORD '*passhash'

I instructed the slave to replicate from master with:

CHANGE MASTER TO  MASTER_HOST='masterIP',  MASTER_USER='repl',  MASTER_PASSWORD='somepass',  MASTER_PORT=3306,  MASTER_LOG_FILE='mariadb-bin.000002',  MASTER_LOG_POS=somelog_position,  MASTER_CONNECT_RETRY=10;

followed by

START SLAVE;

Both Slave_IO_Running and Slave_SQL_Running are set to YES and Slave_SQL_Running_State indicated that relay log has ben read to completion and is waiting for updates.

After creating a TESTREPL database and test table with the root user on a master, I tried to connect to the slaves TESTREPL database. Unfortunately, I am getting an error message saying that access is being denied and that I should verify if I have the right privileges and if the database exist. I can connect to mariadb client, it's just that replicated database is missing. What are the correct privileges on a slave account so that it can connect to the databases on master account created by root or any other user?

master cnf replication settings:

[mariadb]
log-bin=mariadb-bin
server_id=10
binlog-format=mixed

slave cnf replication settings:

[mysqld]
server_id=2
read_only=1
log_bin=mariadb-bin
relay_log=C:\Program Files\MariaDB 10.5\data\mariadb-relay-bin
log_slave_updates=1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.