https://github.com/netkiller/mysql-outfile-plugin
MySQL Outfile plugin
https://github.com/netkiller/mysql-outfile-plugin
mysql mysql-outfile-plugin netkiller
Last synced: about 2 months ago
JSON representation
MySQL Outfile plugin
- Host: GitHub
- URL: https://github.com/netkiller/mysql-outfile-plugin
- Owner: netkiller
- License: bsd-3-clause
- Created: 2017-11-17T09:37:12.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-23T03:58:13.000Z (over 8 years ago)
- Last Synced: 2025-02-22T02:44:33.666Z (over 1 year ago)
- Topics: mysql, mysql-outfile-plugin, netkiller
- Language: C
- Homepage: http://www.netkiller.cn
- Size: 18.6 KB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
mysql-outfile-plugin
=================
MySQL Outfile Plugin
Build
-----
cd /usr/local/src/
git clone https://github.com/netkiller/mysql-outfile-plugin.git
cd mysql-outfile-plugin/
yum install -y cmake3 mysql-community-devel
cmake3 .
make
make install
or
gcc -O3 -g -I/usr/include/mysql -I/usr/include -fPIC -lm -lz -shared -o liboutfile.so outfile.c
sudo mv liboutfile.so /usr/lib/mysql/plugin/
Plugin Install and Uninstall
--------------
### Install
create function out2file returns string soname 'liboutfile.so';
### Uninstall
drop function out2file;
Testing
-------
### 安装插件
mysql> create function out2file returns string soname 'liboutfile.so';
Query OK, 0 rows affected (0.00 sec)
### 调用插件
mysql> select out2file('/tmp/myoutfile',"Helloworld!!!");
+--------------------------------------------+
| out2file('/tmp/myoutfile',"Helloworld!!!") |
+--------------------------------------------+
| true |
+--------------------------------------------+
1 row in set (0.00 sec)
### 查看文件
root@netkiller ~/mysql-outfile-plugin % cat /tmp/myoutfile
Helloworld!!!
# Donations
We accept PayPal through:
https://www.paypal.me/netkiller
Wechat (微信) / Alipay (支付宝) 打赏:
http://www.netkiller.cn/home/donations.html