Aborted connection on an Update statement only

Posted on

Question :

I have node-mysql client that gets “ER_NO_SUCH_USER” whenever it does an UPDATE query. All other type of query are successful but UPDATE fail.

Meanwhile in the server’s log I get the standard:
“[Warning] Aborted connection … (Got an error reading communication packets)”

The client’s DB user has the following permissions:
GRANT SELECT, INSERT, UPDATE, DELETE, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW ON . TO ”@’%’ IDENTIFIED BY PASSWORD ”

Answer :

I sort of found the solution:
I tried running the same query directly on a mysql client, and the error was more enlightening: “MySQL error 1449: The user specified as a definer does not exist”.

Which led me to this post:
https://stackoverflow.com/questions/10169960/mysql-error-1449-the-user-specified-as-a-definer-does-not-exist

I did apply the proposed solution to “Change the definer”. However I was never able to make it work, as the client kept trying to reach the initial definer user (which no longer existed). It seems the user credentials were cached somewhere. So my only solution was to recreate the initial definer. Which stopped the error

Leave a Reply

Your email address will not be published.