How to Reset MySQL Password?
601

You can reset your MySQL password by following these steps:

1. Stop the MySQL service. You can do this by running the following command:

sudo service mysql stop

2. Start the MySQL service in safe mode by running the following command:

sudo mysqld_safe --skip-grant-tables

3. Connect to the MySQL server as the root user by running the following command:

mysql -u root

4. Once you are connected to the MySQL server, use the following command to update the root user's password:

UPDATE mysql.user SET authentication_string=PASSWORD('new_password') WHERE User='root';

Replace "new_password" with your desired password.

5. Flush the privileges and exit the MySQL server by running the following commands:

FLUSH PRIVILEGES; exit;

6. Restart the MySQL service by running the following command:

sudo service mysql start

After following these steps, you should be able to log in to MySQL with your new password.

If you are looking for consultation, fill the Contact Form below.
Our virtues and our failings are inseparable, like force and matter. When they separate, man is no more. Nikola Tesla
Haluk YAMANER - Personal
Contact Form
You must complete Security Verification to submit your form.