MYSQL 5.1 and later versions have another limit. The DLL used to create a function can only be placed in the plugin directory of mysql .. This plug-in directory does not exist by default .. YD: it may be to prevent the DLL from being written to this folder through into dumpfile .. MYSQL cannot create a directory. If the target directory of into dumpfile does not exist, an error is returned. It needs to be created manually, but it is a system variable. I installed MYSQL 5.1.3 on the Virtual Machine for testing. The installation directory is: C: \ Program Files \ MySQL Server 5.1. You can see: show variables like '% plugin %: + ------------------------------- + values | Variable_name | Value + ----------------------------------- + values | plugin_dir | C: \ Program Files \ MySQL Server 5.1 \ Lib/plugin + --------------------------------- + the plug-in directory is located in the lib/plugin directory of the mysql installation directory, which needs to be created manually. Upload udf. dll to this location and create a function. However, the value of this variable is read-only. An error occurs when you try to use set @ plugin_dir = 'd: \ '; to change its value. You can modify this value only by modifying php. ini and adding a plugin_dir = d:/in it.