I’ve written all of MySQL procedures as root@localhost:
CREATE DEFINER=`root`@`localhost` PROCEDURE `p_add_user`(...)
Trouble is, when deploying to another server, I have to replace root with current user and replace localhost with current IP, which is annoying.
Is there any way to write procedures so that someone who wants to use my database and procedures would not have to modify the definer of each procedure?
As stated in MySQL documentation here
So, the DEFINER part is not mandatory, just CREATE PROCEDURE should work.