MariaDB replication. Create an account.

MariaDB replication. Create an account.

Colleagues hello to all.

In today's article we will talk about how to create a replication account and why you need it at all. The replication process itself in MariaDB is when data is copied from one database server to another database server. Connections between servers are implemented just through the account.

 

A replication user is the same user as all other users in the database. The account name can be anything, but there is a non-public rule to name such a user, for example, slave_user or replicator. We will create a user named replication.

mariadb> CREATE USER 'replication'@'%' IDENTIFIED BY 'Qwerty123';

mariadb_user_replication

 

After we have created the replication user, now we need to assign the necessary rights to it. In order for the user to be able to replicate data from the source to the replica, he needs the right called REPLICATION.

mariadb> GRANT REPLICATION SLAVE ON *.* TO 'replication'@'%';

mariadb_user_replication

 

After all that we have done it is desirable to execute the command:

mariadb> FLUSH PRIVILEGES;

mariadb_user_replication

With this command, we tell MariaDB to flush the cache tables mysql.user and mysql.priv and re-read these tables.


 

Thank you all, I hope that my article helped you in some way.

 

SIMILAR ARTICLES

MariaDB - ERROR Incorrect definition of table
MariaDB - ERROR Incorrect definition of table
MARIADB
Read more
Mariabackup backup - gzip compression
Mariabackup backup - gzip compression
MARIADB
Read more
Mariabackup error - Error writing file UNKNOWN errno 32 Broken pipe
Mariabackup error - Error writing file UNKNOWN errno 32 Broken pipe
MARIADB
Read more