How to Reset the root Password of MariaDB Database on Ubuntu

In the management of a MariaDB database, the root account is the superuser account that has full access rights to the database system. However, users may sometimes encounter difficulty accessing the root account if they forget the password. In situations like this, we need to reset the MariaDB root password to regain access to the database. Here is a step-by-step guide to resetting the MariaDB root password.

1. Stop the MariaDB service.

2. Run MariaDB without loading access control tables and networking.

3. Log in to MariaDB.

4. Change the root password using the ALTER command.

5. Stop MariaDB.

6. Start the MariaDB service again.

7. Test the new password by logging in to MariaDB.

Congratulations, you have successfully reset the MariaDB root password.

If you found this article helpful and would like to support my work, consider making a donation through PayPal. Your support helps me continue creating useful content and tutorials. Thank you!

Donate via PayPal: https://paypal.me/musaamin

Leave a Reply

Your email address will not be published. Required fields are marked *