P
P
Para_Lapok2021-06-09 04:53:16
MySQL
Para_Lapok, 2021-06-09 04:53:16

How to set up database replication?

I can't finish replicating the database, now the situation looks like this:

After starting the MySQL console, I created a user, gave him rights. Further, when you need to lock all tables and check the status of the Master-Slave, the table should be like this: mysql-bin.000001, and I have 000 ... and different numbers, it should not be the same ...
I looked at the user status , it says:
+---------------------------------------------------- ------+
| Grants for [email protected]% |
+------------------------------------------------- --+
| GRANT REPLICATION SLAVE ON *.* TO 'slaveuser'@'%' |
+------------------------------------------------- --+
It seems to be what you need, but I don’t understand why the table does not have 000001, but in a different way ...

I took information about replication from different sites, but, basically, I focus on this one and take all the commands from it: highload.today/kak-nastroit-mysql-master-slave-replikatsiyu-3f/. The only thing I'm creating is the user not GRANT REPLICATION SLAVE ON *.* TO 'slave_user'@'%' IDENTIFIED BY 'password'; since I read that this is a deprecated way, but with CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';

Tell me, please, what could be wrong?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question