CREATE ALGORITHM=UNDEFINED DEFINER access denied

July 14, 2021 . 1 MIN READ

http://stackoverflow.com/questions/13492857/create-view-without-super-privileges-in-phpmyadmin

From the documentation:

If you specify the DEFINER clause, you cannot set the value to any user but your own unless you have the SUPER privilege. These rules determine the legal DEFINER user values:

  • *If you do not have the SUPER privilege, the only legal user value is your own account, either specified literally or by using CURRENT_USER. You cannot set the definer to some other account.*
  • If you have the SUPER privilege, you can specify any syntactically legal account name. If the account does not actually exist, a warning is generated.

Check your MySQL account, it is not byname@localhost.

Solutions:

  • Create new view with DEFINER clause using account that granted with SUPER privilege.
  • Do not use DEFINER clause in CREATE VIEW, in this case MySQL will create view DEFINER = CURRENT_USER.

Leave a Reply

Your email address will not be published. Required fields are marked *