sudo su
apt-get install build-essential libncurses5-dev bison groff
wget http://cdn.mysql.com/archives/mysql-5.0/mysql-5.0.51a.tar.gz and save it to /home/android/
cd /home/android
tar -zxvf mysql-5.0.51a.tar.gz
cd /home/android/mysql-5.0.51a
make distclean
./configure --enable-assembler --disable-community-features --without-debug --with-mysqld-ldflags=-all-static --prefix=/data/data/com.solusiprogram.mysql/mysql/ --without-query-cache --without-geometry --without-extra-tools --disable-shared --disable-profiling --disable-grant-options --disable-largefile --without-uca --without-docs --without-man --without-ndb-debug --without-bench
make
make install
cp include/m_string.h include/m_string-original.h
vi include/m_string.h
/* comment out these ...
#if defined(HAVE_STPCPY) && !defined(HAVE_mit_thread)
#define strmov(A,B) stpcpy((A),(B))
#ifndef stpcpy
extern char *stpcpy(char *, const char *);
#endif
#endif
*/
#then repeat from "make distclean" above
cp sql/item.cc sql/item-original.cc
vi sql/item.cc
#comment out this ...
/*
case MYSQL_TYPE_GEOMETRY:
return new Field_geom(max_length, maybe_null, name, table,
(Field::geometry_type)
((type() == Item::TYPE_HOLDER) ?
((Item_type_holder *)this)->get_geometry_type() :
((Item_geometry_func *)this)->get_geometry_type()));
*/
#then comment out this ...
/*
if (item->field_type() == MYSQL_TYPE_GEOMETRY)
geometry_type= (item->type() == Item::FIELD_ITEM) ?
((Item_field *)item)->get_geometry_type() :
(Field::geometry_type)((Item_geometry_func *)item)->get_geometry_type();
*/
#then repeat from "make distclean" above