MySql (Update-) SP only works in the terminal?

I have a stored procedure that works in the mysql> terminal, but when I try to run it through my application, it does not work. I do not receive error messages or anything else. If I try to execute sp through MySql Query Browser, the answer will be simple:
Msgstr "Request canceled."

This particular SP is just a simple update command, but I have other SPs that are SELECT commands and they work.

Ive tried changing DEFINER to "%" and "", but none of them worked.

I think it should be some kind of resolution problem or my.cnf problem, but I have no idea how to fix it, and I seem to be unable to find a solution on the internet machine :)

EDIT: I just tried to execute it from phpmyadmin and it worked. I tried both root and myUser. What's happening?

+3
source share
1 answer

If you can run stored procedures based on selection, rather than updating, the user you connect to the query browser does not have sufficient privileges for some tables or columns updated by the stored procedure. You can verify this using the user manager.

Review: your_user @localhost looks fine since you can run with phpmyadmin, but with a query browser, the user is your_user @%.

+1
source

Source: https://habr.com/ru/post/1751450/


All Articles