Step by step guide to reset root password in Mysql

Working with MySQL or MariaDB database, you might have faced a situation where you might have forgotten root or another user’s password, or being SysAdmin, you might have had to deal with users who have forgotten their password. In this tutorial, we will learn to reset the root password in Mysql or resetting any other user account’s password (the same steps can also be used to reset the user’s password in MariaDB as well).