0

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?

1 Answer 1

2

You have all permissions apart from the GRANT priv, meaning you cannot grant privileges to other user. See WITH GRANT OPTION from the documentation.

Sign up to request clarification or add additional context in comments.

2 Comments

...you've got to be kidding... slap. doesn't the GRANT ALL PRIVILEGES... include actual GRANT privileges?? i used to enumerate them, but started using the ALL keyword... how do i actually GRANT GRANT???
nm. sorted. had to use GRANT GRANT OPTIONS.... thank you so much. feel like a twit... but that's ok. problem sorted.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.