Security Invoker for MYSQL views

When moving mysql databases between machines. It is best if all stored procedures, functions, and views need to have the following line after their create statement:

DEFINER=CURRENT_USER SQL SECURITY INVOKER

Example:

CREATE OR REPLACE
DEFINER=CURRENT_USER SQL SECURITY INVOKER
VIEW
MYVIEW ( A, B, C) as select a,b,c from table

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published.