0

我的查询错了吗?

MariaDB [(none)]> SHOW GRANTS for 'root'@'%';
ERROR 1141 (42000): There is no such grant defined for user 'root' on host '%'

MariaDB [(none)]> show grants for 'wp_user'@'%';
ERROR 1141 (42000): There is no such grant defined for user 'wp_user' on host '%

我的数据库服务器是 MariaDB 10.3.25

4

1 回答 1

1

这不是如何SHOW GRANTS工作的。您需要有一个由用户名和主机名定义的特定用户。您可以使用以下方法查询正确的用户:

SELECT CONCAT('\'', user, '\'@\'', host, '\'') FROM mysql.user; 
于 2021-04-07T19:47:04.060 回答