The pmm user has the RELOAD grant:
[root@pmm-client ~]# mysql -u root -pXXXXXXX -e "SELECT user,host FROM mysql.user WHERE user = 'pmm'\G"
*************************** 1. row ***************************
user: pmm
host: localhost
[root@pmm-client ~]# mysql -u root -pXXXXXXX -e "SHOW GRANTS FOR 'pmm'@'localhost'\G"
*************************** 1. row ***************************
Grants for pmm@localhost: GRANT SELECT, RELOAD, PROCESS, SUPER, REPLICATION CLIENT ON *.* TO 'pmm'@'localhost' IDENTIFIED BY PASSWORD '*XXXXXXX' WITH MAX_USER_CONNECTIONS 10
But can’t execute FLUSH SLOW LOGS
in spite of the general FLUSH LOGS
:
[root@pmm-client ~]# mysql -u pmm -pXXXXXXX -e "FLUSH SLOW LOGS"
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LOGS' at line 1
[root@pmm-client ~]# mysql -u pmm -pXXXXXXX -e "FLUSH LOGS"
[root@pmm-client ~]# echo $?
0
Because we use the lower version of MySQL then 5.5 where “FLUSH SLOW LOGS” was added:
[root@pmm-client ~]# mysql -u root -pXXXXXXX -e "SHOW VARIABLES LIKE 'version%'"
+-------------------------+---------------------------------------------------+
| Variable_name | Value |
+-------------------------+---------------------------------------------------+
| version | 5.1.73-14.12-log |
| version_comment | Percona Server (GPL), Release 14.12, Revision 624 |
| version_compile_machine | x86_64 |
| version_compile_os | unknown-linux-gnu |
+-------------------------+---------------------------------------------------+
Is it possible to find some workaround for MySQL lower then 5.5?