MySQL Privilege Escalation prompt: Can't open shared library 'udf. dll 'Solution

Source: Internet
Author: User

For the can't open shared library 'UDF. dll 'I believe many friends who use MySQL to escalate permissions should not be unfamiliar with it. It is clearly a root user but they are using UDF. this error is prompted when a user-defined function is created by DLL Elevation of Privilege. In the past, this situation was generally abandoned.

After testing, we found that the app server can use UDF. DLL to escalate permissions by 5.037 when setting up a PHP environment.

The PHP environment built by Apache + PHP + MySQL + phpMyAdmin cannot use 5.1

Why can't one of the two systems be used? The reason is very simple because UDF must be started in version 5.1. the DLL file can be placed in the LIB/blugin file under the MySQL installation directory to create user-defined functions, and this directory does not exist by default, and MySQL into dumpfile cannot create folders when exporting files, in MySQL 5.1, UDF was started. the user-defined functions cannot be created when the DLL is imported to the system directory. when the DLL is imported to the system directory, you cannot create user-defined functions. The MySQL version in the system that can be elevation of permission is 5.0.37, And the mysql version in the system that cannot be elevation of permission is 5.1, exactly in line with the above statement.

Execute create function mycmd return string soname 'udf in the unusable System (5.037. the prompt "can't open shared library 'udf" is displayed. dll 'error message, indicating that the user-defined function cannot be created when exported to the system directory. DLL is imported to the LIB/blugin directory under the MySQL installation directory. I already know that the MySQL installation directory is: "C: \ Program Files \ mysql \ MySQL Server 5.1 "the directory Lin/plugin does not exist yet, we use webshell to create the Lib folder under the MySQL installation directory and then create the plugin folder in the Lib folder.
In UDF. php, write "C: \ Program Files \ mysql \ MySQL Server 5.1 \ Lib \ plugin \ UDF. dll" in the DLL export path ". In this case, you can execute the SQL command such as select mycmd ("Net user"); to execute it intelligently...

Create the LIB/plugin directory under the MySQL installation directory, and then set the UDF. the DLL file is exported to this directory, which solves the "can't open shared library 'UDF in MySQL 5.1 and later versions. dll '"is incorrect ....

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.