-
Notifications
You must be signed in to change notification settings - Fork 1
LeonardoSalvucci/lib_mysqludf_udp
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
# MySql send_udp UDF Function Perhaps you need to extract info from a database `when data occurs` and this tool was made for send this over udp port. For example, you can create a trigger on `after insert` event and extract some data to analyze in other environment. Note that i don't use TCP because it's a blocking type of socket and can make the database crash. Otherwise we must be careful because an UDP packet does not have ack and we can lose information. #### Function definition send_udp(ip,port,message); #### Manual instalation To add this function to your mysql you must copy send_udp.so to mysql plugin library path (ex: /usr/lib/mysql/plugin) and execute this SQL sentnce as root in mysql server > CREATE FUNCTION send_udp RETURNS INTEGER SONAME "send_udp.so"; #### Example of use mysql> select send_udp('127.0.0.1',1234,'Test Message'); +-------------------------------------------+ | send_udp('127.0.0.1',1234,'Test Message') | +-------------------------------------------+ | 0 | +-------------------------------------------+ 1 row in set (0,00 sec)
About
Mysql UDF function to send data over udp
Resources
Stars
Watchers
Forks
Releases
No releases published