Skip MySQL Password Authentication
For certain software you may need to temporarily disable your MySQL root password authentication.
Closing MySQL on the firewall
When disabling authentication, it is highly recommended that your firewall is closed, make sure you read the guide specific to your firewall software to accomplish this and use a port tester to make sure the port is actually closed before starting the next step.
For UFW, check the status of your UFW rules by running the following command:
ufw status numberedTo delete the rule, use the following command, replacing <rule_number> with the actual number of the rule you want to delete:
ufw delete <rule_number>For example, if the rule number is 3, the command would be:
ufw delete 3Disable the service
For MariaDB:
systemctl stop mariadbFor MySQL:
systemctl stop mysqlTurn on MySQLd safe mode
mysqld_safe --skip-grant-tables --skip-networkingEnter the MySQL Shell
mysql -u root