Description:
Hi, I am getting "Access denied for user 'monuser'@'%'" while doing "explain for connection 19;".
The required set of privileges seems fine. Moreover the documentation:- https://dev.mysql.com/doc/refman/8.0/en/explain-for-connection.html doesn't clearly specifies exactly what other privileges are required other than the "PROCESS".
mysql> show grants for `monuser`@`%`;
+--------------------------------------------------------------------------+
| Grants for monuser@% |
+--------------------------------------------------------------------------+
| GRANT SELECT, PROCESS, SUPER, REPLICATION CLIENT ON *.* TO `monuser`@`%` |
+--------------------------------------------------------------------------+
1 row in set (0.00 sec)
How to repeat:
Session1:
mysql> select * from Employee;select sleep (30);
Session2:
mysql> show processlist;
+----+-----------------+-----------+--------+---------+-------+------------------------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-----------------+-----------+--------+---------+-------+------------------------+------------------+
| 5 | event_scheduler | localhost | NULL | Daemon | 15867 | Waiting on empty queue | NULL |
| 14 | root | localhost | NULL | Sleep | 1523 | | NULL |
| 19 | root | localhost | sbtest | Query | 2 | User sleep | select sleep(30) |
| 21 | monuser | localhost | NULL | Query | 0 | init | show processlist |
+----+-----------------+-----------+--------+---------+-------+------------------------+------------------+
4 rows in set (0.01 sec)
mysql> explain for connection 19;
ERROR 1045 (28000): Access denied for user 'monuser'@'%' (using password: YES)
Suggested fix:
Its working fine when provided a full set of access.
Example
GRANT all privileges on *.* to `monuser`@`%`;