How to reset the MySql root password
How to reset the MySql root password The command line of this article is for the MySQL 8 or higher version. I have tested these commands on Ubuntu 20.04 LTS. Commands may work on other Ubuntu versions too. So, First, we need to check the version of your MySQL. Check the MySql version mysql --version Execute the following command to Stop the MySQL server (We need to stop the MySQL in order to change the password) sudo systemctl stop mysql.service You can apply the following command to check whether the MySQL server stopped or not sudo systemctl status mysql.service Enter ctrl+C to return to the command prompt Now start MySQL server manually without permission networking checks and set “MYSQLD_OPTS” environment variable sudo systemctl set-environment MYSQLD_OPTS="--skip-networking --skip-grant-tables" Start the MySQL service sudo systemctl start mysql.service You can apply the following command to check whether the MySQL server started or not sudo systemctl status mysql...