What is phpMyAdmin
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.
The installation on the NAS-Device requires a working lighttpd with php and the MySQL-Database server. Please follow the respective tutorials for the installation of these.
Download and unpacking
cd /srv/www/pages/ wget http://switch.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-3.3.8.1-all-languages.tar.gz tar -zxf phpMyAdmin-3.3.8.1-all-languages.tar.gz rm phpMyAdmin-3.3.8.1-all-languages.tar.gz mv phpMyAdmin-3.3.8.1-all-languages phpmyadmin
Now you have a directory called phpmyadmin
in the webroot of your lighttpd.
Configuring
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 filemy.cnf
of mysql on the lineskip-networking
- 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.
Finally
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.
Hi, just little correction.
In first code snippet there should be:
cd /srv/www/pages/
not
cd /srv/pages/
Anyway, great tutorials. Tweaking my DNS-320 right now 🙂
Thanks!
I certainly knew about the majority of this, but that being said, I still considered it had been beneficial. Beautiful task!
Thanks so much Uli !
This was very helpful indeed.
The only thing I think it’s important to add is that the file “config.inc.php” must have the permissions to be world writable.
That is easilly done using:
# chmod 705 config.inc.php
Thanks again for all these tremendous tools and tutorials. AMAZING stuff indeed.
I was successful in installing per your instr. Thanks.
Two errors I get in phpmyadmin: (DNS-323)
The mysqli extension is missing
The mcrypt extension is missing
Isn’t mysqli important for performance?
Thx