How To Install MySQL Server + phpMyAdmin through Entware-NG

0 -  Flash RMerlin firmware from here

1 - Install Entware-NG from here and choose to create swap file

2 - Install lighttpd web server and php from here

3 - Install MySQL

opkg install mysql-server php5-mod-mysqli
mysql_install_db --force
/opt/etc/init.d/S70mysqld restart

4 - Create a password for mysql root user, confirm password and press ENTER

/opt/bin/mysqladmin password desired_mysql_password

5 - Login to mysql

mysql -u root -p

 - Create your first database

mysql> create database my_first_database;
mysql> grant all privileges on my_first_database.* to root@localhost identified by 'desired_mysql_password';
mysql> quit

7 - Download phpMyAdmin, version is the last working on mysql server v5.1, don't try a newer version

cd /opt/share/www/
wget --no-check-certificate
mv ./phpMyAdmin- ./phpmyadmin
rm ./

8 - Install required packages

opkg install php5-mod-mbstring php5-mod-json php5-mod-session php5-mod-mysqli

9 - Restart lighttpd

/opt/etc/init.d/S80lighttpd restart

10 - Fix phpmyadmin configuration file

cp /opt/share/www/phpmyadmin/ /opt/share/www/phpmyadmin/
chmod 644 /opt/share/www/phpmyadmin/
sed -i 's/localhost/' "/opt/share/www/phpmyadmin/"

11 - Go to your router ip address and port 81/phpmyadmin or

phpmyadmin112 - Input root as username and password from point 4 then press Go


Now you are ready to make changes on desired databases

This tutorial is dedicated to TheOpenSourceTV :)