0

When I export any database from phpmyadmin usually mysql following definer for VIEWS and FUNCTIONS .

CREATE DEFINER=`root`@`localhost` FUNCTION
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `

Is there anything that can be done to avoid that??

Hello World
  • 2,673
  • 7
  • 28
  • 60
  • 1
    it is usually no problem, as the backup would restore also the users with thier privileges. and so you would not notice it – nbk Oct 07 '20 at 20:35
  • @nbk I am having trouble importing into another device with a different user, – Hello World Oct 07 '20 at 20:38
  • 1
    you will have to remove it https://stackoverflow.com/questions/9446783/remove-definer-clause-from-mysql-dumps – nbk Oct 07 '20 at 20:38

1 Answers1

0

Better try this

CREATE ALGORITHM=UNDEFINED DEFINER=CURRENT_USER SQL SECURITY INVOKER
Albin C S
  • 340
  • 1
  • 5