

Start the database server without loading the grant tables: sudo mysqld_safe -skip-grant-tables & Start the MySQL/MariaDB server without loading the grant tables # To do so type the following command: sudo systemctl stop mysql 2. To change the root password first, you need to stop the MySQL server.

How to Reset MySQL or MariaDB Root Password #įollow these steps to reset your MySQL/MariaDB root password: 1. Or output like this for MariaDB: mysql Ver 15.1 Distrib 10.1.33-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2īe sure to make a note of which version of MySQL or MariaDB you’re running.

If you have MySQL installed in your system the output will look something like this: mysql Ver 14.14 Distrib 5.7.22, for Linux (x86_64) using EditLine wrapper You can find your server version by issuing the following command: mysql -version Identify the Server Version #ĭepending on the MySQL or MariaDB server version you are running on your system, you will need to use different commands to recover the root password. In this article, we will show you how to reset the MySQL root password from the command line. How to Reset Your #WordPress Password? | Email Link to Reset Password on WordPress | WPHub
