TECHIES WORLD

For Techs.... Techniques.... Technologies....

AWSBashCpanelLinuxMysql

How to grant access to binlog for user in MySQL

Sometime it may require to to grant access to binlog for a user other that superuser in MySQL.

We can use the following query to provide the access.

>GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'username'@'%' IDENTIFIED BY 'password';

Where username and password need to be replaced with appropriate values.

Please note that binary log should be enabled in the MySQL server.

>show variables like 'log_bin';

+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| log_bin       | ON    |
+---------------+-------+

That's all…

Leave a Reply