Reputation: 857
getting some odd behaviour with my remote connexion to the db. user table looks like this:
+-----------+-----------+
| host | user |
+-----------+-----------+
| % | manage |
| % | remoteusr |
| 127.0.0.1 | root |
| ::1 | root |
| localhost | root |
+-----------+-----------+
running select current_user();
gives me this:
+----------------+
| current_user() |
+----------------+
| manage@% |
+----------------+
and show grants;
gives me this:
+---------------------------------------------------------------------------------+
| Grants for manage@% |
+---------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'manage'@'%' IDENTIFIED BY PASSWORD '-REDACTED-' |
+---------------------------------------------------------------------------------+
so for all intents, this should allow me to do whatever the hell i want from wherever the hell i connect. but when i try to create a new user, this is the error i get:
MariaDB [thing_db]> grant all privileges on thing_db.* to 'remoteusr'@'%';
ERROR 1044 (42000): Access denied for user 'manage'@'%' to database 'thing_db'
totally stumped here. based on the docs, there is no alternate permission that could be authenticated against. when i select user()
, i get manage@localhost
, which should still allow me to do what i need as there is no empty @locahost
in the user table.
this seems a pretty straightforward thing and i've flush privileges;
several times to no effect.
so what the heck is going on here that i'm missing?
Upvotes: 0
Views: 445
Reputation: 9050
You have all permissions apart from the GRANT
priv, meaning you cannot grant privileges to other user. See WITH GRANT OPTION
from the documentation.
Upvotes: 2