Do math functions require routine privileg on MySQL 8?

Viewed 44

I migrated from MySQL 5.7 to 8.0 and the same application now throws this error:

 msg="query error" logger=tsdb.mysql err="Error 1370: execute command denied to user 'myuser'@'localhost' for routine 'mydatabase.SUM'"

The user is granted the select privileg like on 5.7

Do Math functions require more privileges?

I changed SQL mode before, because I needed full group by. Might this be the cause?

sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
1 Answers

have you followed the upgrade instructions this shouldn't happen

But do a

 1. log in as `root`
 2. `GRANT EXECUTE ON FUNCTION `db_name`.`mydatabase` TO 'myuser'@'localhost';
 3. `flush privileges;`

And then all should run again

Related