Error encountered while migrating database:
Error code:1418. This function has none of the deterministic, NO SQL, or READS SQL DATA in its declaration and binary logging are enabled (you * Might* want to use the less safe log_bin_trust_function_creators variable)
Workaround:
Run on the CentOS terminal:
# mysql-uroot-p Your password
MariaDB [(None)]> show variables like '%func% ';
+---------------------------------+-------+
| variable_name | Value |
+---------------------------------+-------+
| log_bin_trust_function_creators | OFF |
+---------------------------------+-------+
1 row in Set (0.00 sec)
MariaDB [(None)]> set global Log_bin_trust_function_creators=1;
Query OK, 0 rows Affected (0.00 sec)
MariaDB [(None)]> show variables like '%func% ';
+---------------------------------+-------+
| variable_name | Value |
+---------------------------------+-------+
| log_bin_trust_function_creators | On |
+---------------------------------+-------+
1 row in Set (0.00 sec)
Explain:
By default, the creation of function is forbidden.
It turns out that the binary log option is turned on for two MySQL servers in the master-slave replication Log-bin,slave will replicate data from master, and some operations, such as function results, may be different on master and slave, so there is a potential security risk. Therefore, the creation of the function is blocked by default.
If you have to use it, close it again.
CentOS7 Femdom MySQL One of the faithful