OpenWrt Forum Archive

Topic: HowTo: Enable InnoDB in Mysql

The content of this topic has been archived on 21 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

For only one good reason(*) need to enable InnoDB support in Mysql for AR7161.

And I dont know how to do that sad((

Im running r31249 in a Dir-825 with extroot

(*) InnoDB support more than 1000bytes in Keys and my sql backups cant restore in openwrt sad
So cant migrate from my intel-watt-burner-server to my fantastic 3W-green-WRT.
(**) By the time Im writing, I did:
svn checkout svn://svn.openwrt.org/openwrt/trunk/
feeds update -a && feeds install -a
make defconfig && make prereq && make download
make (and waiting a lot.... have time to write this post.)

I dont know where to configure Mysql to support innoDB sad

Help is really appreciated.

SOLVED:
Have to compile and add:
1) "--with-innodb" in Makefile and
2) "add 3 lines in conf/my.cnf"

Howto-on-Ubuntu (open the terminal)

sudo apt-get install subversion build-essential gawk git-core zlib1g-dev libncurses5-dev -y
svn co svn://svn.openwrt.org/openwrt/trunk/
cd trunk
./scripts/feeds update -a
./scripts/feeds install -a
make defconfig
make prereq
make menuconfig
( in my case, i have dlink-825, so I chose in TARGETSYSTEM -> Atheros AR7xxx/AR9xxx and in TARGETPROFILE -> D-link DIR-825)
( then select MYSQL as M (module) in UTILITIES / DATABASES )
( then exit and save)
make
( first are making a whole tools,toolchain & firmware )
( afer hours or minutes of compiling go next )
nano feeds/packages/libs/mysql/Makefile
( add a NEW line "--with-innodb \" (without quotes) after "--with-server \" near line 86 (dont remove the slash at the end)
( thats all, save and exit)
nano feeds/packages/libs/mysql/conf/my.cnf
( add these 3 new lines after "bind addres ..." )
innodb
innodb_file_per_table = 1
innodb_flush_log_at_trx_commit = 2
( save & exit, and run the next command )
make package/feeds/packages/mysql/compile
(copy the mysql-server_5.1.53-7_ar71xx.ipk from the folder bin/ar71xx/packages to your router)

( Now on the router do this)
opkg update && opkg install nano
md5sum mysql-server_5.1.53-7_ar71xx.ipk
(copy the md5 sum, you will use it in the next step)
nano /tmp/opkg-lists/attitude_adjustment (or your distribution file of pkg)
( find with nano "control+w"  -> "mysql-server" and change the md5 value for the copied before )
( save and exit )
opkg install mysql-server_5.1.53-7_ar71xx.ipk
( END )


Thanks all ! smile

UPDATED: added required libs in a clean ubuntu installation. "gawk git-core zlib1g-dev libncurses5-dev"

(Last edited by glococo on 8 Jul 2012, 14:02)

Hi,
I also need innodb on my application, so I try your posted way.
On make step there is an error say that could not download mysql source code
(MySQL-seever 5.1.66). Since I am newbie in Linux, please help to solve the problem.

Thanks in advance.
Johan

Hi, I still can not solve the problem.
I use TP-Link WR 741 ND router
Can you share the innodb enabled mysql package for this router?

Thanks,
Johan

Hi,

Finally I can do the compile. I figure it out that the problem is my admin block the access to the site.
I do the compile under trunk, but when I try to install it on my router, there is an error message :

root@OpenWrt:~# opkg install mysql-server_5.1.68-1_ar71xx.ipk
Installing mysql-server (5.1.68-1) to root...
Multiple packages (libc and libc) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (libpthread and libpthread) providing same name marked HOLD or PREFER. Using latest.
Collected errors:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for mysql-server:
*      libncursesw *
* opkg_install_cmd: Cannot install package mysql-server.
root@OpenWrt:~#


I also do compile under backfire. The result can be installed in my router, but the innodb still do not functioning.

mysql> show variables like 'have_innodb';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| have_innodb   | NO    |
+---------------+-------+
1 row in set (0.00 sec)

mysql> show engines;
+------------+---------+-----------------------------------------------------------+--------------+------+------------+
| Engine     | Support | Comment                                                   | Transactions | XA   | Savepoints |
+------------+---------+-----------------------------------------------------------+--------------+------+------------+
| CSV        | YES     | CSV storage engine                                        | NO           | NO   | NO         |
| MRG_MYISAM | YES     | Collection of identical MyISAM tables                     | NO           | NO   | NO         |
| MEMORY     | YES     | Hash based, stored in memory, useful for temporary tables | NO           | NO   | NO         |
| MyISAM     | DEFAULT | Default engine as of MySQL 3.23 with great performance    | NO           | NO   | NO         |
+------------+---------+-----------------------------------------------------------+--------------+------+------------+
4 rows in set (0.00 sec)

What wrong with my packages? Please Help to solve my problem.
It will appreciated if anybody would share the mysql-server package (innodb enabled) for TP-Link WR 741ND.


Regards,
JOHAN

The discussion might have continued from here.