How to Reset MySQL Root User Password on Ubuntu 22.04

If you are using MySQL database, and have forgotten its root user’s password or want to reset it for some reason. For this, you have to use 3 commands of mysql such as sudo systemctl set-environment MYSQLD_OPTS=”–skip-networking –skip-grant-tables”, flush privileges;,