描述讲解(第七步开始): https://blog.csdn.net/xb191799981/article/details/85991094
---查询当前共享库文件存放路径
show variables like 'plugin_dir';
---将so库文件复制到共享路径下
cp libHttpClient.so /usr/lib/mysql/plugin/
---查询当前已导入的共享方法有哪些
select * from mysql.func;
---开始创建共享方法
DROP FUNCTION IF EXISTS Http_Get;
DROP FUNCTION IF EXISTS Http_Post;
create function Http_Get RETURNS string soname 'libHttpClient.so';
create function Http_Post RETURNS string soname 'libHttpClient.so';
---查询分析器中调用共享方法
select Http_Get('http://www.baidu.com') as Val;
select Http_Post('http://www.baidu.com','a=1&b=2') as Val;