Skip to content
This repository has been archived by the owner on Aug 29, 2019. It is now read-only.
/ mysql-udf-pubnub Public archive

An mysql UDF for sending message to Pubnub.com using database triggers.

License

Notifications You must be signed in to change notification settings

ubogdan/mysql-udf-pubnub

Repository files navigation

Pubnub.com Mysql UDF

We are not using this plugin any more. The plugin is good/working state.

  1. edit udf_pubnub.go and setup corret publish(pubKey), subscribe(subKey), security(secKey).
const (
	pubKey = "pub-c-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
	subKey = "sub-c-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
	secKey = "sec-c-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
)
  1. Build plugin
make build 
  1. Upload the plugin into server by ftp and copy the file in the mysql plugin path
mysql> show variables like 'plugin_dir';
+---------------+--------------------------+
| Variable_name | Value                    |
+---------------+--------------------------+
| plugin_dir    | /usr/lib64/mysql/plugin/ |
+---------------+--------------------------+
1 row in set (0.00 sec)
  1. Install the plugin
DROP FUNCTION IF EXISTS pubnub_grant;
CREATE FUNCTION pubnub_publish RETURNS INT SONAME 'pubnub_udf.so'
DROP FUNCTION IF EXISTS pubnub_publish;
CREATE FUNCTION pubnub_grant RETURNS INT SONAME 'pubnub_udf.so';

About

An mysql UDF for sending message to Pubnub.com using database triggers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published