hi
when restoring/script out a function from percona xtraDB cluster 5.7.x to 8.0.19, the function is
DELIMITER $$CREATE DEFINER=asadmin
@%
FUNCTION rawtohex
(raw varbinary(100)) RETURNS varchar(100) CHARSET utf8return hex(raw)$$DELIMITER ;
but it shows error
DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled
I check this:
https://stackoverflow.com/questions/26015160/deterministic-no-sql-or-reads-sql-data-in-its-declaration-and-binary-logging-i
it seems I have to run this:
-
Execute the following in the MySQL console:
SET GLOBAL log_bin_trust_function_creators = 1;
-
Add the following to the mysql.ini configuration file:
log_bin_trust_function_creators = 1;
any reason for it? and i still have to run SET GLOBAL log_bin_trust_function_creators = 1; on each cluster node for replication to works well.
how to make it once restarted mysql this configure still keep ?