我是靠谱客的博主 凶狠绿草,这篇文章主要介绍mysql httpget,我可以在MySQL下直接在SQL中运行HTTP GET吗?,现在分享给大家,希望可以做个参考。

I'd love to do this:

UPDATE table SET blobCol = HTTPGET(urlCol) WHERE whatever LIMIT n;

Is there code available to do this? I known this should be possible as the MySQL Docs include an example of adding a function that does a DNS lookup.

MySQL / windows / Preferably without having to compile stuff, but I can.

(If you haven't heard of anything like this but you would expect that you would have if it did exist, A "proly not" would be nice.)

EDIT: I known this would open a whole can-o-worms re security, however in my cases, the only access to the DB is via the mysql console app. Its is not a world accessible system. It is not a web back end. It is only a local data logging system

解决方案

No, thank goodness — it would be a security horror. Every SQL injection hole in an application could be leveraged to start spamming connections to attack other sites.

You could, I suppose, write it in C and compile it as a UDF. But I don't think it really gets you anything in comparison to just SELECTing in your application layer and looping over the results doing HTTP GETs and UPDATEing. If we're talking about making HTTP connections, the extra efficiency of doing it in the database layer will be completely dwarfed by the network delays anyway.

最后

以上就是凶狠绿草最近收集整理的关于mysql httpget,我可以在MySQL下直接在SQL中运行HTTP GET吗?的全部内容,更多相关mysql内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(61)

评论列表共有 0 条评论

立即
投稿
返回
顶部