What is phpMyAdmin
Quote from Wikipedia:
phpMyAdmin is an open source tool written in PHP intended to handle the administration of MySQL over the World Wide Web. It can do various tasks such as creating, modifying or deleting databases, tables, fields or rows; executing SQL statements; or managing users and permissions.
Download and unpacking
Check the homepage of phpMyAdmin for the current version and download it. As of 13-Dec-2010, this latest non-beta version is 126.96.36.199:
cd /srv/www/pages/ wget http://switch.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-188.8.131.52-all-languages.tar.gz tar -zxf phpMyAdmin-184.108.40.206-all-languages.tar.gz rm phpMyAdmin-220.127.116.11-all-languages.tar.gz mv phpMyAdmin-18.104.22.168-all-languages phpmyadmin
Now you have a directory called
phpmyadmin in the webroot of your lighttpd.
Now we need to add a configuration-file for
phpmyadmin. We use nano for this:
cd /srv/pages/phpmyadmin/ nano config.inc.php
Simply copy the content below to this file:
<? /* Servers configuration */ $i = 0; /* Server localhost */ $i++; $cfg['Servers'][$i]['host'] = 'localhost'; $cfg['Servers'][$i]['extension'] = 'mysql'; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['compress'] = false; $cfg['Servers'][$i]['auth_type'] = 'http'; ?>
Errors and Remarks
- The auth_type “http” was chosen as cookie is extremely slow without the php-extension mcrypt which is not compiled into the current php-versions
- If you get an error with the code
#2002, you have to change the host to “127.0.0.1” and add a comment in the file
my.cnfof mysql on the line
- If you get the error
The mbstring PHP extension was not found and you seem to be using a multibyte charset. Without the mbstring extension phpMyAdmin is unable to split strings correctly and it may result in unexpected results, you have to enable the mbstring-extension in the php.ini of your NAS.
Now you should see phpmyadmin under
http://CH3SNAS/phpmyadmin (substitute CH3SNAS with the network-name of your NAS-Device).
For further information consider reading the documentation online.