|
Finally...after people have been asking for this for a looong time, there is a working binary for Mysql for Olegs firmware.
The user lucaspr was nice enough to write a small howto on installing and setting up. I have copied the how to here. Thanks for the great work lucaspr.
Before you proceed, you should have completed my ipkg package system tutorial.
Now get the beter ipkg an uClibc. The ipkg.sh below will complaining about missing /opt/lib/ipkg/lists/wl500g, but that is no problem since we are installing straight from the ipk files.
# get the better ipkg
wget http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/ipkg-opt_0.99.163-9_mipsel.ipk
#install it (ignore tne missing lists/wl500g error)
ipkg.sh install ipkg-opt_0.99.163-9_mipsel.ipk
# get the better uclibc
wget http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/uclibc-opt_0.9.28-12_mipsel.ipk
# install it (ignore tne missing lists/wl500g error)
ipkg.sh install uclibc-opt_0.9.28-12_mipsel.ipk
# update the list using the improved ipkg
ipkg update
Now upGRADE your system:
ipkg upgrade
ipkg list_installed
ipkg install -force-reinstall 'ALL-THE-INSTALLED-PACKAGES'
# These are listed in the previous command! Except for ipkg and uclibc (You already upgraded these remember??)
Now install Mysql
ipkg install mysql
ignore the error messages.. We're still working on it!
Now for the 'hard' part. We'll have to change the name of 'admin' (default) into 'root' otherwise mysql won't work.
(COnfig pages of WL-HDD, system -> change name)
Change the name of admin into root for Telnet (and/or SSH)
nano /etc/passwd
change the line:
admin:$1$uVp0rbe2$/pFIqeoCxe1spdyUOa6OP1:0:0:root:/usr/local/root:/bin/sh
(note: the passwordhash should be different!!)
into
root:$1$uVp0rbe2$/pFIqeoCxe1spdyUOa6OP1:0:0:root:/usr/local/root:/bin/sh
To save this file:
CTRL + O (press Y)
CTRL + X
Making it permanent:
flashfs save
flashfs commit
flashfs enable
reboot and re-login with root instead of admin.
All packages should be installed and almost ready to go. Only a few things left to change and we should be going...
The MySQL database directory is corrupted in some way. We can fix this by the following command:
rm /opt/var/lib/mysql/mysql/*.*
rmdir /opt/var/lib/mysql/mysql
Then to rebuild this database:
/opt/bin/mysql_install_db
at last (but not least):
chown -R root:root /opt/var/lib/mysql
Then to start mysql type:
/opt/etc/init.d/S70mysqld start
Now for security-reasons (obviously) CHANGE THE PASSWORD for the ROOT user:
To do so, start the server, then issue the following commands:
/opt/bin/mysqladmin -u root password 'your-new-password' **
** With my first installation something went wrong and I got an error about can't load library libmysqlclient.so.14 ...
This is solved by typing: ln -s /opt/lib/mysql/libmysqlclient.so /opt/lib/libmysqlclient.so.14 ((sym)link to the right library)
Note: MySQL is pretty heavy for a Asus WL-HDD. I've got it running some time now and it's running a bit slow. Don't think about putting in large databases. For a simple homepage it's fine!
|