MYSQLのViewやストアドルーチンにはSECURITY_TYPEがあり、
DEFINERやINVOKERを指定する事が出来ます。
セキュリティの詳細を設定出来ますが、ホストやアカウントの変更をした場合に明示的に
DEFINERの設定をしてある場合は設定の変更が必要な場合があります。

mysql> show create view V_Region \G
*************************** 1. row ***************************
View: V_Region
Create View:

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost`
SQL SECURITY DEFINER VIEW `V_Region` AS select `City`.`Name` AS `CityName`,
`Country`.`Name` AS `CountryName` from (`City` join `Country`)
where ((`City`.`CountryCode` = `Country`.`Code`) and (`City`.`CountryCode` = 'DEU'))

character_set_client: utf8
collation_connection: utf8_general_ci
1 row in set (0.00 sec)

mysql>

mysql> select * from information_schema.VIEWS where TABLE_SCHEMA = 'STUDY'\G

definer_security

mysql> show create PROCEDURE DB01.SP_TABLE101_2\G
*************************** 1. row ***************************
Procedure: SP_TABLE101_2
sql_mode: NO_AUTO_CREATE_USER
Create Procedure:

CREATE DEFINER=`root`@`localhost` PROCEDURE `SP_TABLE101_2`(OUT PARAMETER1 INT)
BEGIN
SELECT COUNT(*) INTO PARAMETER1 FROM TABLE101;
END

character_set_client: utf8
collation_connection: utf8_general_ci
Database Collation: utf8_general_ci
1 row in set (0.00 sec)

mysql>

mysql> select * from information_schema.ROUTINES where ROUTINE_SCHEMA = 'DB01'\G

definer_security_proc

—————————————————————————————————–
(例) DEFINERをホストやIPアドレスの変更により変えた場合
—————————————————————————————————–

ALTER ALGORITHM=UNDEFINED DEFINER=`USER1`@`192.168.1.112`
SQL SECURITY DEFINER VIEW `V_Region` AS select `City`.`Name` AS `CityName`,
`Country`.`Name` AS `CountryName` from (`City` join `Country`)
where ((`City`.`CountryCode` = `Country`.`Code`) and (`City`.`CountryCode` = 'DEU'));

definer_change


ALTER ALGORITHM=UNDEFINED DEFINER=`root`@`localhost`
SQL SECURITY INVOKER VIEW `V_Region` AS select `City`.`Name` AS `CityName`,
`Country`.`Name` AS `CountryName` from (`City` join `Country`)
where ((`City`.`CountryCode` = `Country`.`Code`) and (`City`.`CountryCode` = 'DEU'));

invoker

ストアドルーチンに関しても同様

ALTER DEFINER=`USER1`@`192.168.1.112`
PROCEDURE `SP_TABLE101_2`(OUT PARAMETER1 INT)
BEGIN
SELECT COUNT(*) INTO PARAMETER1 FROM TABLE101;
END

参考サイト
20.1. ALTER VIEW 構文