views:

140

answers:

1

I am trying to install a Levenshtein UDF for MySQL but I am having a ton of problems, I think mainly because of the lack of documentation for Macs. The specific UDF I am using is this one: http://joshdrew.com/mysql%5Flevenshtein%5Fudf-1.0.tar.gz and is done in C++.

So far, I have gotten successful compilation using:

g++ -Wall -bundle -bundle_loader /usr/local/mysql/bin/mysqld -o ml.so -I/usr/local/mysql/include -L/usr/local/mysql/lib  mysqllevenshtein.cc

The only problem is that when I run the UDF, I get this error:

ERROR 2013 (HY000): Lost connection to MySQL server during query

This leads me to believe that I am not compiling the file correctly. I have even tried following suggestions on this page, but compilation fails. I get:

/usr/local/mysql/bin/mysql_config --cflags: No such file or directory

Does anybody know how to properly compile C++ UDFs for Mac OS X, and specifically Snow Leopard? If anyone can steer me in the right direction, I would be greatly appreciated!

A: 

Found the answer here: http://blog.gumho.org/2009/11/compiling-and-installing-c-and-c-udfs.html

trinth