WD NAS App Builder

All apps

phpMyAdmin 5.2.3-1

Manage the NAS's MySQL (MariaDB) databases from a web interface

databases

Download

NASSizeSHA256
My Cloud PR410014 MBDownloadd968960818f8c840…
My Cloud PR210014 MBDownloadc845aaf7e654db12…
My Cloud DL410014 MBDownload3a2ed4c05a5d2daf…
My Cloud DL210014 MBDownload0794272c18ef99ec…
My Cloud EX410014 MBDownloade75f25ee28b2ab80…
My Cloud EX210014 MBDownload89871df3516a8676…
My Cloud EX2 Ultra14 MBDownloadff84e62d172f3c41…
My Cloud Mirror (Gen 2)14 MBDownloadd8ae5fd569e3a330…
My Cloud (Gen 2)14 MBDownload87ad4c11974ffe2f…
WD Cloud14 MBDownload1c84ee37a9b6034d…

Easier: install it from the Store, which also updates it.

PhpMyAdmin allows the simple management of MySQL (or in this case, MariaDB) databases from a web UI.

Its HTTPS address

With the Nginx app installed, phpMyAdmin is also at https://phpmyadmin.<domain>/phpMyAdmin/ (added automatically, from its nginx.json). That address asks first for the user name admin and a password of its own (generated by the app - not the admin account's below - and shown on the management page, which can also change it): Nginx checks it before anyone reaches phpMyAdmin's login. It can be switched off on the page ("Ask for this password first"), leaving only phpMyAdmin's login - keep it on if the address can be reached from the internet. The NAS's own address (http://<nas-ip>/phpMyAdmin/, on the local network) has only phpMyAdmin's login.

Logging in

Log in as admin. A random password is generated on first install and saved, readable by root only, in Nas_Prog/_phpMyAdmin/admin_password on the install volume (e.g. cat /mnt/HD/HD_a2/Nas_Prog/_phpMyAdmin/admin_password over SSH). It is kept across reinstalls. Password-less logins (e.g. root) are disabled, and MySQL is not exposed to the network.

Changing the admin password

The easiest way is phpMyAdmin's page in the NAS dashboard (Apps → phpMyAdmin): it shows the password and can change it - to one you choose, or a generated one - and also links to phpMyAdmin itself. Only NAS admins can use the page (see Management pages).

It can also be done in phpMyAdmin itself:

  1. Log in to phpMyAdmin as admin.
  2. On the home page, under General settings, click Change password, enter the new password and click Go.
  3. Over SSH, put the new password in the password file so it stays in sync (edit it with vi rather than echo, to keep the password out of your shell history):

``sh vi /mnt/HD/HD_a2/Nas_Prog/_phpMyAdmin/admin_password ``

The file is only used to create the admin account. Reinstalling the app deletes the account and recreates it with whatever password is in this file, so if you skip this step, a reinstall changes the password back.

Resetting a forgotten password

Over SSH, set the account back to the password in the file (adjust the volume to match your install):

PW_FILE=/mnt/HD/HD_a2/Nas_Prog/_phpMyAdmin/admin_password
mysql --user=root --password= -e "ALTER USER 'admin'@'localhost' IDENTIFIED BY '$(cat ${PW_FILE})';"
cat ${PW_FILE}

Things to avoid

  • Don't set a password for MySQL root. The NAS's own scripts (e.g. /usr/bin/mysql_reset.py) and this app's install and remove scripts log in as root with an empty password, and would stop working. root can't log in to phpMyAdmin anyway, and MySQL only accepts connections from the NAS itself.
  • Don't add a password-changing page to the app's web folder. App web pages bypass the NAS login and run as root, so anyone on the network could use it.