errno 193 means wrong file format.
Probably there is an inconsistency between your 64 bit MySQL and the .dll. Most of the the pages from Google are talking about incompatible 32-bit and 64-bit Java versions.
So I recommend either trying with a 32-bit MySQL, compiling the plugin for 64-bit or checking if the install routine has some assumptions about 64 or 32 bits ?
How to compile MySQL example plugin in Windows
質問
I need to compile fulltext parser plugin in windows, but I am not able to dot it even with original MySQL source example. MySQL Server version is 5.6 x64. With gcc I tried variations of:
gcc -shared -Wall -g -o "plugin_example.dll" -fPIC "plugin_example.c" -DMYSQL_DYNAMIC_PLUGIN -lmysqlservices
but when I try to install it
INSTALL PLUGIN simple_parser SONAME 'plugin_example.dll'
I get following error
Can't open shared library '... plugin_example.dll' (errno: 193 )
With Dev-C and its (stripped -L libs)
gcc.exe -c projekt3.c -o projekt3.o -DMYSQL_DYNAMIC_PLUGIN -DBUILDING_DLL=1
dllwrap.exe --output-def libProjekt3.def --implib libProjekt3.a projekt3.o -static-libgcc -lmysqlservices --no-export-all-symbols --add-stdcall-alias -o Projekt3.dll
I get 250K DLL and
Can't find symbol '_mysql_plugin_interface_version_' in library
Five days of googling a trial-erroring leads me nowhere. Any help would be appreciated.
解決
他のヒント
I found a small sample here: http://www.clusterdb.com/mysql/creating-a-mysql-plugin-to-produce-an-interger-timestamp
Basically it is for a nix system, but you could do the same on Windows.
gcc -Idrive:\path\to\mysql\include\ -fPIC -shared -o plugin_example.dll plugin_example.c
Then copy it to the plugin lib
drive:\path\to\mysql\lib\plugin\
then you create the function like so:
create function inttime RETURNS REAL SONAME 'plugin_example.dll';
You can find the whole shebang here: http://dev.mysql.com/doc/refman/5.6/en/udf-compiling.html