Tuesday, June 26, 2007

First release of the BLOB Streaming engine for MySQL

I have just released the first version of the BLOB Streaming engine for MySQL (MyBS). You can download the source code of the engine from http://www.blobstreaming.org/download. Pluggable binaries for MySQL 5.1.19 (32-bit Linux and Mac OS X) are also available.

To install the plug-in copy libmybs.so to the /usr/local/mysql/lib/mysql directory, connect to your server using mysql, and enter:

mysql> install plugin MyBS soname "libmybs.so";

This version allows you to download BLOBs that are already stored in the database using HTTP. The URL is specified as follows:

http://mysql-host-name:8080/database/table/blob-column/condition

Where condition has the form: column1=value1&column2=value2&...

I gave an example of this in my previous blog: "GET"ing a BLOB from the database with the BLOB Streaming Engine

8080 is the default port, which can be set using the mybs_port system variable on the mysqld command line. For example: mysqld --mybs_port=8880

In order for BLOB streaming to work you also need PBXT version 0.9.87 which is streaming enabled. Streaming enabled simply means the engine supports the MyBS server-side streaming API.

This version of PBXT is also available from www.blobstreaming.org, or from Sourceforge.net.

Note that this version is currently only for use behind the firewall because the HTTP access is unrestricted.

The next step will be to enable the uploading of BLOBs using the HTTP PUT method, and the implementation of basic security.

4 comments:

Anonymous said...

Greetings, I keep getting the following Error message

I installed Mysql 5.1. I copied the MyBS binary into
/usr/local/mysql/lib/

I logged into mysql as root. and I get the following error message

mysql> INSTALL PLUGIN MyBS SONAME "libmybs.so";
ERROR 1126 (HY000): Can't open shared library '/usr/local/mysql-5.1.23-rc-osx10.5-x86/lib/libmybs.so' (errno: 0 dlopen(/usr/local/mysql-5.1.23-rc-osx10.5-x86/lib/libmybs.so, 2): Symbol not found: __Z19close_thread_tablesP3THDbb


how can I fix?

Thank you,

Paul McCullagh said...

Hi,

I have just posted updates for the plugins, for Mac OS X.

You can download the MyBS plugin for MySQL 5.1.23 here.

And the PBXT 0.9.91 plugin for MySQL 5.1.23 here.

Let me know if you need any more to get things going.

Anonymous said...

Paul,
I am having the same problem on a Mac OS 10.4 running MySQL 5.1. I picked up the lib version for Mac (as per your previous comment on the blog). When I execute the install command in mysql I get the following error

ERROR 1126 (HY000): Can't open shared library '/usr/local/mysql-5.1.31-osx10.4-i686/lib/plugin/libpbxt.so' (errno: 0 dlopen(/usr/local/mysql-5.1.31-osx10.4-i686/lib/plugin/libpbxt.so, 2): Symbol not found: _chmod$UNIX2003

Paul McCullagh said...

The plugins on www.primebase.org were built for MySQL 5.1.30. Please give that a try.

The alternative would be to build it yourself, which is really easy. A quick guide to building is also on the download page.