How To Reset A Forgotten MariaDB Root Password on CentOS 7
MariaDB is a community-developed fork of the MySQL relational database management system intended to remain free under the GNU GPL. It is notable for being led by the original developers of MySQL, who forked it due to concerns over its acquisition by Oracle.
Step: 1. Stop the Database Server :
# systemctl stop mariadb.service
On Ubuntu Users :
# service mariadb stop
Step: 2. Start MariaDB with Unrestricted Access :
# mysqld_safe --skip-grant-tables --skip-networking &
Press Enter.
Step: 3. Now the Database is Started, Logon to it without Passwords :
# mysql -u root
Step: 4. Change the MariaDB root Password :
mariadb> use mysql;
mariadb> update user set password=PASSWORD("new-password") where User='root';
mariadb> flush privileges;
mariadb> \q
Step: 5. Stop the Database :
# systemctl stop mariadb.service
Step: 6. Now Start the MariaDB Service :
# systemctl start mariadb.service
Step: 7. Logon as the root User with the New Password :
# mysql -u root -p
Enter Password:
Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog
0 comments:
Post a Comment