# when restoring/script out a function from percona xtraDB cluster 5.7.x to 8.0.19 it shows error

**URL:** <https://forums.percona.com/t/when-restoring-script-out-a-function-from-percona-xtradb-cluster-5-7-x-to-8-0-19-it-shows-error/7918>\
**Category:** Percona XtraDB Cluster 8.x\
**Tags:** community, mysql, percona\
**Created:** [August 18, 2020, 3:27am UTC](https://forums.percona.com/t/when-restoring-script-out-a-function-from-percona-xtradb-cluster-5-7-x-to-8-0-19-it-shows-error/7918 "2020-08-18T03:27:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DBA100](https://avatars.discourse-cdn.com/v4/letter/d/b3f665/32.png) [@DBA100](https://forums.percona.com/u/DBA100)\
**Post date:** [August 18, 2020, 3:27am UTC](https://forums.percona.com/t/when-restoring-script-out-a-function-from-percona-xtradb-cluster-5-7-x-to-8-0-19-it-shows-error/7918/1 "2020-08-18T03:27:36Z")

</div>

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](https://stackoverflow.com/questions/26015160/deterministic-no-sql-or-reads-sql-data-in-its-declaration-and-binary-logging-i)
  
I check this:  
[https://stackoverflow.com/questions/26015160/deterministic-no-sql-or-reads-sql-data-in-its-declaration-and-binary-logging-i](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:  
  

1. Execute the following in the MySQL console:

2. Add the following to the mysql.ini configuration file:

but it seems it still lock the ability to create function even I use root to test creating it.  
  
any reason for it? and i still have to run&nbsp;&nbsp;SET GLOBAL log\_bin\_trust\_function\_creators = 1;&nbsp; &nbsp;on each cluster node for replication to works well.  
  
how to make it once restarted mysql this configure still keep ?
