ERROR 1418 (HY000) at line xx: This function has none of DETERMINISTIC
APACHE, PHP and MYSQL LOGOS |
This error occurred when you have to execute SQL file that contains function. i am trying to import SQL file using terminal like this:
mysql -u root -p1234 my_database < dump.sql
So there's many solution, when that error occurred. These 3 solutions for you solve this problem. I sometimes use the third one, because it do it permanently.
1. The first would be, when you dump into SQL file, please be always using command MYSQLDUMP, for example
mysqldump -u root -p1234 my_database > dump.sql
Always use that as the main dumping tool, using exporting tool for example from MySQL Workbench or Navicat, sometimes that dump file will not working in the importing process. Using MYSQLDUMP commands always work perfectly.
2. In the MySQL console, execute the following commands
SET GLOBAL log_bin_trust_function_creators = 1;
3. Edit the mysql.ini configuration file, and add this line, require MySQL restart
log_bin_trust_function_creators = 1;
That's all the three solutions i can provide.