Change Default Password for MySQL/MariaDB and phpMyAdmin on NAS


I always need to look for the default password for MariaDB and phpMyAdmin in my NAS. There is no hint at all. Some even change the rules after upgrade. Therefore, I write a note here and share to save your time. This page would be continuously maintained.

Asustor

You don’t need to install MariaDB which is already build-in in ADM. Open ServicesMariaDB Server, select “Enable MariaDB server”, and click “Apply” to launch.

If your application and MariaDB run on the same machine, there is no need to select “Enable MariaDB remote access”. More detail, please read Using NAS as your Database Server.

About phpMyAdmin, you need to register an Asustor ID in SettingsRegistration. Then to install it from App Central first. In 2016/6/19, the phpMyAdmin is 4.0.1.

Default

ADM 2.6.1 R5H1
MySQL root/admin
phpMyAdmin root/admin

Reset MySQL root Password in ADM 2.6.1

Reset MySQL in ADM
Reset MySQL in ADM

Open Services → MariaDB Server, click “Reset Password” then “OK” to confirm. It will remind you the password for MySQL has been changed into default “admin”.

Change Password for MariaDB and phpMyAdmin in ADM 2.6.1

Edit user privileges in phpMyAdmin 4.0.1
Edit user privileges in phpMyAdmin 4.0.1

There is no build-in tools to customize MariaDB‘s password. You will need phpMyAdmin. Login and click on “Users” tab. Click the “Edit privileges” which is next to root user at localhost.

Change user password in phpMyAdmin 4.0.1
Change user password in phpMyAdmin 4.0.1

Scroll down until “Change password” section, provide your new password in these fields. Then press “Go” which is on lower right in the same section to execute.

Once MariaDB‘s password has been changed, phpMyAdmin is changed to the same new password.

If you want change the authentication from cookie to http or config, you may copy from config.sample.inc.php to config.inc.php which is located in /share/Web/phpMyAdmin. Then edit it manually. Auth types and Cookie authentication options provides detail description.

QNAP

You don’t need to install MySQL which is already build-in in QTS. Open Control PanelApplicationsSQL server, select “Enable SQL server”, and click “Apply” to launch.

If your application and MySQL run on the same machine, there is no need to select “Enable TCP/IP networking”. More detail, please read Using NAS as your Database Server.

About phpMyAdmin, you need to install it from App Center first. In 2016/6/19, the phpMyAdmin is 4.2.3.

Default

QTS 4.2
MySQL root/admin
phpMyAdmin root/admin

Reset MySQL root Password in QTS 4.2

Reset MySQL in QTS
Reset MySQL in QTS

Open Control PanelApplicationsSQL server, click “Reset Root Password” then “Apply” to confirm. It will remind you the password for MySQL has been changed into default “admin”.

Change Password for MySQL and phpMyAdmin in QTS 4.2

Edit user privileges in phpMyAdmin 4.2.3
Edit user privileges in phpMyAdmin 4.2.3

There is no build-in tools to customize MySQL‘s password. You will need phpMyAdmin. Login and click on “Users” tab. Click the “Edit privileges” which is next to root user at localhost.

Change user password in phpMyAdmin 4.2.3
Change user password in phpMyAdmin 4.2.3

Scroll down until “Change password” section, provide your new password in these fields. Then press “Go” which is on lower right in the same section to execute.

Once MySQL‘s password has been changed, phpMyAdmin is changed to the same new password.

If you want change the authentication from cookie to http or config, you may manually edit config.inc.php which is located in /share/HDA_DATA/.qpkg/phpMyAdmin/phpMyAdmin or /share/Web/phpMyAdminAuth types and Cookie authentication options provides detail description.

Synology

You have to install both MariaDB and phpMyAdmin from Package Center. In 2016/6/19, the phpMyAdmin is 4.6.2.

Default

DSM 5.2 DSM 6.0
MySQL root/[empty]
* Password is empty aka null string.
root/[admin password]
* Same as admin
phpMyAdmin root/[empty]
* Password is empty aka null string.
root/[admin password]
* Same as admin

Reset MariaDB root Password in DSM 6.0

MariaDB Dialog in DSM
MariaDB Dialog in DSM 6.0

Click on MariaDB icon to launch above configuration dialog. Then click “Change MariaDB password” to pop-up “Log in to MariaDB” dialog.

For password reset, ignore the “MariaDB password” field and click “Reset MariaDB Password”. It will be rest to empty aka null string.

Change Password for MySQL and phpMyAdmin in DSM 6.0

** Use build-in tool to customize password for both. phpMyAdmin will destroy DSM‘s  mechanism. **

Click on MariaDB icon to launch above configuration dialog. Then click “Change MariaDB password” to pop-up “Log in to MariaDB” dialog.

For password customization, provide your password in “MariaDB password” and click “OK”. A new dialog will pop-up for new password for root.

Once MariaDB‘s password has been changed, phpMyAdmin is changed to the same new password.

Reference

  1. Asustor
  2. Asustor ADM
  3. Asustor: Support Center: How do I configure MySQL? What is the default password for MySQL? If I forget admin password for MySQL, how should I do?
  4. Asustor: Support Center: What is the default username and password for phpMyAdmin?
  5. Julien Nicole Blog: Synology : Installing phpMyAdmin
  6. Julien Nicole Blog: Synology : Installing MariaDB
  7. MariaDB
  8. MySQL
  9. phpMyAdmin
  10. phpMyAdmin: Docs: Cookie authentication options
  11. phpMyAdmin: Wiki: Auth types
  12. QNAP: How do I reset or change a root password for MySQL?
  13. QNAP: QTS
  14. Synology: DSM
  15. Using NAS as your Database Server
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s