The boring, necessary details: I'm on Snow Leopard running MySQL
locally.
I'm trying to install the Sphinx
engine for MySQL
like so:
mysql> install plugin sphinx soname 'sphinx.so';
ERROR 1127 (HY000): Can't find symbol '_mysql_plugin_interface_version_' in library
I've Googled开发者_如何转开发 everywhere and can't seem to find an actual solution to this problem. For example this issue on the Sphinx forums seems unresolved. Someone else also raised this issue with similar results.
The first post linked to this O'Reilly article which says:
There is a common problem that might occur at this point: ERROR 1127 (HY000): Can't find symbol '_mysql_plugin_interface_version_' in library If you see a message like this, it is likely that you forgot to include the -DMYSQL_DYNAMIC_PLUGIN option when compiling the plugin. Adding this option to the g++ compile line is required to create a dynamically loadable plug-in.
But the article ends on that point; I have no idea what this means or how to resolve the issue.
Configure mysql like this:
./configure --prefix=/usr/local/mysql
dont use:
./configure --prefix=/usr/local/mysql --with-plugins=sphinx
It forces the compiler to link the plugin statically.
Once done you should have a file called 'ha_sphinx.so'
I finally had to just recompile MySQL entirely rather than install it as a plugin. This involved a number of gotchas in and of itself, too. But save yourself the headache of trying to recreate the same compile conditions for Sphinx that you used for MySQL and just recompile all at once following the Sphinx documentation to the letter.
精彩评论