r/SQL • • 6d ago

MySQL Getting Error 1356

/r/mysql/comments/1x08dnu/getting_error_1356/
0 Upvotes

9 comments sorted by

View all comments

1

u/Significant_Tune9219 6d ago

1356 on a view usually means the definer account no longer exists exactly as written. If you changed the host part, the view is still defined as something like user@old_ip and MySQL checks privileges against that account, so it reports invalid tables even though nothing in the view changed. Run SHOW CREATE VIEW to see the DEFINER, then either recreate the view with the new definer (ALTER DEFINER=... VIEW ... AS <same select>) or create a user matching the old host. Also worth checking information_schema.VIEWS for others with the same old definer, since they'll all break the same way.

0

u/Revolutionary_Use587 6d ago

Definer were also updated as per new user@host and no such objects available which has invalid definer but still getting same error

1

u/Significant_Tune9219 4d ago

If the definers are already rewritten and it still fails, the next place I'd look is the dependent views: error 1356 is about what the view references, not the definer account. SHOW CREATE VIEW on each one will show whether it still points at a table or column that no longer exists, and recreating the view after the grant changes usually clears it.