Mysql error #1305 FUNCTION db.sys_exec does not exists

穿精又带淫゛_ 提交于 2019-12-20 03:42:13

问题


I am using phpmyadmin. I am using a trigger in mysql which calls a php script after inserting something in a table. My trigger contains this.

DECLARE result INT;
SET result=(select sys_exec('C:/xampp/php/php.exe C:/xampp/htdocs/mysite/hello.php'));

But i got this error while trying to insert something to the table.

#1305 FUNCTION db.sys_exec does not exists

(my database name is db) Help me with this.Thanks.


回答1:


sys_exec is not a standard mysql function. It's provided by an external UDF plugin, and must be installed separately: https://github.com/mysqludf/lib_mysqludf_sys#readme




回答2:


In Linux Ubuntu system and few other distributions, mysql server package contains apparmor which limits UDF functions.

Stop apparmor

sudo service apparmor stop

Check apparmor status

sudo service apparmor status

Even then if you get the same error, restart mysql service

Restart mysql

sudo service mysql restart


来源:https://stackoverflow.com/questions/24433851/mysql-error-1305-function-db-sys-exec-does-not-exists

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!