Knowledgebase
How to reconfigure the password of root account in MariaDB
Posted by Quote 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
=>
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

(0 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
Help Desk Software by Kayako Fusion