-
First, you have to open your terminal ;)
-
You have to install homebrew if it's not already done :
$ brew install grep
- Once homebrew downloaded, just enter this command in a terminal :
$ /usr/bin/grep -nw sql/file/path/yourfile.sql -e "DEFINER"
Be carefull /usr/bin/grep if it's you're on a mac. For others user it will be /bin/grep/ (not sure)
It will show you what are the current definers, like that :
DEFINER=`foo`@`XX.X.XX.%`
- To finish, use this command line to change currents definers :
$ sed -i -- 's/DEFINER=`foo`@`XX.X.XX.%`/DEFINER=`root`@`localhost`/g' ./sql/file/path/yourfile.sql
You can do the command to show definers again to check if it was updated.
GRANT ALL ON *.* TO 'root'@'localhost' IDENTIFIED BY 'root'; FLUSH PRIVILEGES;
or
grant all on *.* to 'root'@'%' identified by 'password' with grant option;
Replace "root" by your definer identifior that you can find when you try to change row on sequelpro.