Compiling MySQL 5.1 for OWm2

Hopefully as MySQL 5.1 moves to a final stable release things will get much simpler... in the meantime, that's what you are supposed to do. The versions used are explicitly stated, if you have any weird surprise by later version pls signal it here.Pls note that this instructions are for Debian only, maybe they work under other systems, but I haven't checked them and I do not plan to check them in the future.

Mysql

 

NB! Make 300% sure you have no older MySQL installs in your box, if you do you are going to waste a LOT of time.

Download the latest version from here: http://dev.mysql.com/downloads/mysql/5.1.html#source (using mysql-5.1.26-rc in this example)

Get the innoDB plugin from: http://www.innodb.com/innodb_plugin/download/101/ (using 1.0.1 for the example)

Delete the standard Innobase storage engine and replace it with the plugin

  • rm -R ./mysql-5.1.26-rc/storage/innobase
  • mkdir ./mysql-5.1.26-rc/storage/innobase
  • cp -R ./innodb_plugin-1.0.1 ./mysql-5.1.26-rc/storage/innobase

Get Sphinx and place the SphinxSE storage engine in MySQL sources

Note! if you cannot extecute aclocal at this point it probably means your automake is outdated.

Now let's compile it

  • ./configure --with-plugins=innobase,sphinx
  • make
  • make install

If everything went smoot, on starting MySQL you should be able to execute show engines and see both Innodb and Sphinx in it.

Next we need to mount plugin UDF libraries (sources are at http://www.mysqludf.org ). They are used to implement an Oracle-like RAISE_EXCEPTION behaviour and to have the standard XML functions we are using in OWm2

  • wget http://www.mysqludf.org/lib_mysqludf_xql/lib_mysqludf_xql-0.9.7.tar.gz
  • wget http://www.mysqludf.org/lib_mysqludf_udf/lib_mysqludf_udf_0.0.3.tar.gz
  • tar xvf lib_mysqludf_xql-0.9.7.tar.gz
  • mkdir lib_mysqludf_udf_0.0.3
  • mv lib_mysqludf_udf_0.0.3.tar.gz lib_mysqludf_udf_0.0.3
  • cd lib_mysqludf_udf_0.0.3
  • tar xvf lib_mysqludf_udf_0.0.3.tar.gz
  • gcc -shared lib_mysqludf_udf.c -o lib_mysqludf_udf.so -I /usr/include/mysql

You should have a lib_mysqludf_udf.so file in your dir now

  • cd ../lib_mysqludf_xql-0.9.7
  • apt-get install libxml2-dev
  • ./configure
  • make
  • make install
  • libtool --finish /usr/local/lib/lib_mysqludf_xql
  • mysql -u root -p < installdb.sql
  • cd ../lib_mysqludf_udf_0.0.3
  • cp lib_mysqludf_udf.so /usr/local/lib/mysql/plugin
  • mysql -u root -p < lib_mysqludf_udf.sql

This should be enough, for now. Next we have to start Mysql

 

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
five - = zero
Solve this math question and enter the solution with digits. E.g. for "two plus four = ?" enter "6".