Update MariaDB + PhpMyAdmin PW

UserAccounts – root/localhost user – edit privileges

image-20211226075719051

 

Hit Change Password –

image-20211226075856971

 

Update Password

image-20211226075928864

 

Changes root for mariaDB and phpmyadmin – so relogin

 

+++++++++++++++++++++++++++++

 

 

https://amigotechnotes.wordpress.com/2016/06/20/change-default-password-for-mysqlmariadb-and-phpmyadmin-on-nas/

Change Default Password for MySQL/MariaDB and phpMyAdmin on NAS

2016/06/20 Amigo How-To, InformationAsustor, MariaDB, MySQL, NAS, password, phpMyAdmin, QNAP, Synology

 

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 S**erver, 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 R5h3  
MySQL root/admin  
phpMyAdmin root/admin  

Reset MySQL root Password in ADM 2.6.1

Reset MySQL in ADMReset MySQL in ADM

Open Services → *MariaDB S**erver*, 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] [

(https://amigotechnotes.files.wordpress.com/2016/06/edit-user-privileges-in-phpmyadmin-4-0-1.png)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]

 

[(https://amigotechnotes.files.wordpress.com/2016/06/change-user-password-in-phpmyadmin-470-1.png)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.

 

 

How to reconfigure the password of root account in MariaDB
How to reconfigure the password of root account in MariaDB
================================================================

1. Go to ADM\Services\MariaDB Server to stop the MariaDB service

2. Use ssh to login into the NAS by "root" account

3. Run the mysql service without permission:
root@AS7004T# mysqld_safe –skip-grant-tables –skip-networking &

4. Login into the mysql by root root@AS7004T#mysql -u root
Below is what you will see in the console:

Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 2 Server version: 10.0.28-MariaDB Source distribution Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

5. Flush the privileges =>
MariaDB [(none)]> FLUSH PRIVILEGES;

6. Alter the passwords:
Example: =>
We set the pass as admin for root
MariaDB [(none)]> ALTER USER 'root'@'localhost' IDENTIFIED BY 'admin';
MariaDB [(none)]> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('admin');
MariaDB [(none)]> UPDATE mysql.user SET authentication_string = PASSWORD('admin') WHERE User = 'root' AND Host = 'localhost';

7. Go to ADM\Services\MariaDB to enable the MariaDB

 

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 QTSReset 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.3Edit 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.3Change 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/phpMyAdmin. Auth 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 DSMMariaDB 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