How to reconfigure the password of root account in MariaDB
Posted by Anton Lin on 28 August 2017 01:51 AM

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

6. Alter the passwords:
=> 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

Comments (0)
Post a new comment
Full Name:
CAPTCHA Verification 
Please enter the text you see in the image into the textbox below. This is required to prevent automated registrations and form submissions.

Help Desk Software by Kayako Fusion