我一直在努力解决这个问题,但我很快就会出现问题。我作为grant all privileges on *.* to 'root'@'%' with grant option
的当前用户在mariadb服务器上尝试'root'@'localhost'
并不断获得拒绝访问权限。
SHOW GRANTS FOR CURRENT_USER()\G;
*************************** 1. row ***************************
Grants for root@localhost: GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*sanitized' WITH GRANT OPTION
*************************** 2. row ***************************
Grants for root@localhost: GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION
我已多次尝试FLUSH PRIVILEGES
以及重启服务。
+--------------------------+---------------+------------+------------+
| host | user | Grant_priv | Super_priv |
+--------------------------+---------------+------------+------------+
| localhost | root | Y | Y |
MariaDB [(none)]> select current_user();
+----------------+
| current_user() |
+----------------+
| root@localhost |
+----------------+
select user,host from mysql.user;
+---------------+--------------------------+
| user | host |
+---------------+--------------------------+
| root | % |