I made mysql-server version 5.5.2 of course this version is very old but useful for routers without using swap and the file size is very small.
currently I can only build on openwrt 17.01.x and 18.04.x.
i tried to build on openwrt 19.07.x but i got an error log i am including below and it seems it is related to gcc version issue in openwrt 19.07.x and i don't know how to solve this error
nour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -iremap/home/admin/jj/build_dir/target-mipsel_24kc_musl/mysql-5.5.2:mysql-5.5.2 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -fpic -fno-implicit-templates -fno-exceptions -fno-rtti -MT mysqlbinlog.o -MD -MP -MF .deps/mysqlbinlog.Tpo -c -o mysqlbinlog.o mysqlbinlog.cc
In file included from client_priv.h:18:0,
from mysqlbinlog.cc:31:
../include/my_global.h:915:0: warning: "isnan" redefined
#define isnan(x) ((x) != (x))
In file included from ../include/my_global.h:421:0,
from client_priv.h:18,
from mysqlbinlog.cc:31:
/home/admin/jj/staging_dir/toolchain-mipsel_24kc_gcc-7.5.0_musl/include/math.h:78:0: note: this is the location of the previous definition
#define isnan(x) ( \
mysqlbinlog.cc:1147:1: error: narrowing conversion of '18446744073709551615' from 'ulonglong {aka long long unsigned int}' to 'longlong {aka long long int}' inside { } [-Wnarrowing]
};
^
mysqlbinlog.cc:1147:1: error: narrowing conversion of '18446744073709551615' from 'ulonglong {aka long long unsigned int}' to 'longlong {aka long long int}' inside { } [-Wnarrowing]
Makefile:971: recipe for target 'mysqlbinlog.o' failed
make[5]: *** [mysqlbinlog.o] Error 1
make[5]: Leaving directory '/home/admin/jj/build_dir/target-mipsel_24kc_musl/mysql-5.5.2/client'
Makefile:671: recipe for target 'all' failed
make[4]: *** [all] Error 2
make[4]: Leaving directory '/home/admin/jj/build_dir/target-mipsel_24kc_musl/mysql-5.5.2/client'
Makefile:630: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/home/admin/jj/build_dir/target-mipsel_24kc_musl/mysql-5.5.2'
Makefile:188: recipe for target '/home/admin/jj/build_dir/target-mipsel_24kc_musl/mysql-5.5.2/.built' failed
success build openwrt 17.01.x and 18.04
BusyBox v1.25.1 () built-in shell (ash)
_________
/ /\ _ ___ ___ ___
/ LE / \ | | | __| \| __|
/ DE / \ | |__| _|| |) | _|
/________/ LE \ |____|___|___/|___| lede-project.org
\ \ DE /
\ LE \ / ----------------------------------------------------------
-
\ DE \ / Reboot (17.01.4, r3560-79f57e422d)
\________\/ ----------------------------------------------------------
-
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@LEDE:~# mysql -V
mysql Ver 14.14 Distrib 5.5.2-m2, for openwrt-linux-gnu (mipsel) using readline 7.0
root@LEDE:~# mysql -u root -ppass123
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.2-m2 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| hotspot |
| mysql |
| test |
+--------------------+
4 rows in set (0.00 sec)
mysql> quit
Bye
root@LEDE:~#