MySQL 5.1.66 cannot grant monitoring user to check SLAVE STATUS
--------------------------------------------------
Problem Summary --------------------------------------------------- MySQL 5.1.66 cannot grant monitoring user to check SLAVE STATUS
Problem Description ---------------------------------------------------
Good morning, i need help in order to grant a monitor user to check the slave status in a master-salve replication. This is the error and the activity done to solve without success, the issue:
MariaDB [(none)]> show slave status\G ERROR 1227 (42000): Access denied; you need the SUPER,REPLICATION CLIENT privilege for this operation MariaDB [(none)]> exit Bye MariaDB [(none)]> GRANT SUPER, RELOAD, PROCESS, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO zabbix@'%'; Query OK, 0 rows affected (0.00 sec)
- Login with user zabbix:
mysql -S /mysql/mysql.sock -u zabbix -p Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 205415 Server version: 5.1.66-MariaDB-log (MariaDB - http://mariadb.com/) Copyright (c) 2000, 2012, Oracle, Monty Program Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> show slave status\G ERROR 1227 (42000): Access denied; you need the SUPER,REPLICATION CLIENT privilege for this operation MariaDB [(none)]> exit
- Granted user zabbix with grant full privileges:
GRANT ALL PRIVILEGES ON *.* TO zabbix@'%'; MariaDB [(none)]> show slave status\G ERROR 1227 (42000): Access denied; you need the SUPER,REPLICATION CLIENT privilege for this operation
It is a bug of older version? If i do the same on MySQL 5.7 the monitoring user can check the slave status.
Answer
Problem solved, someone has created 2 local user zabbix@127.0.0.1 and zabbix@localhost so when i grant the one of them i think there was conflict. Deleting zabbix@127.0.0.1 the command SHOW SLAVE STATUS worked. Thanks.