An error occurred while solving MySQLReplication: OS: redhat as4
Master: MySQL 4.0.23
Slave: MySQL 5.0.37
An error message in the slave log is as follows:
060807 11:40:17 [ERROR] While trying to obtain the list
Slaves from the master 'XXX. xxx. xxx: 3306 ', user 'Rep' got
Following error: 'Access denied. You need the REPLICATION SLAVE
Privilege for this operation'
On the master node, run the following statement to view permissions:
Mysql> show grant for 'Rep '@ '192. 168.0.2'/G
* *************************** 1. row ***************************
Grants for rep@192.168.0.2: grant select, REPLICATION SLAVE ON
*. * TO 'rep '@ '192. 168.0.2' identified by password 'XXX'
I have already granted the replicaion slave permission. why do I still report this error?
You can view the manual and source code to know that slave needs to execute a statement to update the slave list:
Show slave hosts;
To execute this statement, you need the replicaion client permission. Therefore, an error is reported. Therefore, you only need to add the replicaion client permission to the 'rep 'account.
In addition, the replicaion client permission does not appear to be used in old versions such as MySQL 4.0/4.1.