I have a nodejs service which is trying to run a stored procedure on a mysql database but the call fails with execute command denied to user
.
The same service can successfully execute simple SELECT
s and return data with no problems.
If I connect to the mysql database using the mysql command line utility, and log in as the same user that the nodejs service is configured to use, then the stored procedure works fine.
Why does running the stored proc remotely fail, but running it locally work?
EDIT
Following the advice below, this is the result of running show grants
whilst accessing mysql from the command line:
And this is the result when I run it through my node app:
{"Grants for myuser@%":"GRANT USAGE ON *.* TO `myuser`@`%` IDENTIFIED BY PASSWORD '*blahblahblahblahblahblah'"}
I don't understand why the GRANT SELECT, INSERT
etc has gone since i thought using the %
wildcard meant that it shouldnt care about which domain it thinks myuser
is coming from.