SQL-Fehler (1227): Access denied...

SwissCharles's profile image SwissCharles posted 4 weeks ago in General Permalink

... you need (at least one of) the RELOAD privilege(s) for this operation" Hi All

I run HeidiSQL (v. 12.15.1.1) on a Linux Mint (Cinnamon) OS (v. 22.3).

Configured it to reach a MariaDB Server/Database on a remote (within same WiFi network) Ubuntu 24.04. Server through SSH, which works well.

Everything works OK until I want to go to 'User Authentication and Privileges'. Then the following Error message appears:

SQL Error (1227): Access denied; you need (at least one of) the RELOAD privilege(s) for this operation.

I am able to enter a new table, etc. I am not sure, though, if other areas are affected as well...

When listing the privileges of the User in question with:

SHOW GRANTS FOR 'user'@'localhost';

As output I get:

GRANT ALL PRIVILEGES ON 'database'.* TO 'user'@'localhost'

Shouldn't 'GRANT ALL' grant, well, everything? Or am i missing something obvious?

Thanks for your thoughts and time!

Greetings from Basel, Switzerland

Charles

ansgar's profile image ansgar posted 4 weeks ago Permalink

When exactly does that error appear - when you open the user manager, or when you try to click or save changes there?

"GRANT ALL" is not really all. There is a "GRANT" privilege which is not included in "ALL". And it needs a syntax you can see here:

GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION;
SwissCharles's profile image SwissCharles posted 4 weeks ago Permalink

Good morning Ansgar and thank you for your feedback!

The error appears already upon trying to open the user manager.

Oh, I see. I will research the GRANT command and it's WITH GRANT OPTION more thoroughly then.

Thanks and greetings from a sunny Basel

Charles

SwissCharles's profile image SwissCharles posted 4 weeks ago Permalink

Good evening Ansgar I applied the GRANT ALL command that you recommended (plus FLUSH PRIVILEGES; afterwards), but the same error still applies.

What I noticed (don't know if that's pointing to something relevant) is the following line appearing twice in the log window:

/* Warning: mysql_options(-1, ...) failed */

See attached Screenshots.

Thanks for any further help - much appreciated!

Mit freundlichen GrĂ¼ssen aus Basel

Charles

2 attachment(s):
  • HeidiSQL_1
  • HeidiSQL_2
ansgar's profile image ansgar posted 4 weeks ago Permalink

You can safely ignore the "Warning: mysql_options(-1, ...) failed". That happens due to differences in libmysql and libmariadb, but normally does no harm.

What is causing the error is the FLUSH PRIVILEGES, when you have no RELOAD privilege. You can see that in the log panel when you try to open the user manager:

FLUSH PRIVILEGES;
/* SQL Error (1227): Access denied; you need (at least one of) the RELOAD privilege(s) for this operation */

Now that FLUSH PRIVILEGES is actually just a thing to ensure all users are written to disk. It's actually not required to open the user manager. Without the mentioned RELOAD privilege you cannot modify users or privileges, but you might only want to see/read in the dialog. I think I will change the initial FLUSH PRIVILEGE to ignore the error, so the dialog opens then.

Code modification/commit e7ea5aa from Ansgar Becker <anse@heidisql.com>, 4 weeks ago, revision 12.16.0.7250
feat: do not require MySQL's RELOAD privilege just for opening the user manager

See https://www.heidisql.com/forum.php?t=44896
SwissCharles's profile image SwissCharles posted 3 weeks ago Permalink

Thanks, Asgar! That's some terrific fast reaction time!

I have downloaded the new release 12.16 as well as libqt6pas6 and installed both. Unfortunately, the same error message as above still occurs -> But only with one database.

I then opened a second database which resides on the same server and lo and behold, there the User Manager appears without any problem!!

I wonder what might be the difference between the two databases..?.. I will try to analyse this tomorrow. If you have an idea on what to look for, I will be most grateful!

Anyway: Many thanks for getting that new release out this fast and for bearing with me - much appreciated!

Charles

ansgar's profile image ansgar posted 3 weeks ago Permalink

v12.16 does not have my latest modification from today. Newer builds for Linux are available on https://nightly.link/HeidiSQL/HeidiSQL/workflows/lazarus.yaml/lazarus once I have merged changes to the Lazarus codebase.

SwissCharles's profile image SwissCharles posted 3 weeks ago Permalink

Thank You!

Greetings! Charles

Please login to leave a reply, or register at first.