Anansewaa
reset MySQL root password

Reset MySQL root password via command line – mysql 5.7

The MySQL root password allows the root user to have full access to the MySQL database. You must have (Linux) root administrator access to the server to reset MySQL root password.
Use the following steps to reset a MySQL root password by using the command line interface.

Stop The MySQL Service

(Ubuntu And Debian) Run the following command:

(CentOS, Fedora, And Red Hat Enterprise Linux) Run the following command:

Start MySQL Without A Password

Run the following command. The ampersand (&) at the end of the command is required.

Connect To MySQL

Run the following command:

Set A New MySQL Root Password

Run the following command:

Stop And Start The MySQL Service

(Ubuntu And Debian) Run the following commands:

...

(CentOS, Fedora, And Red Hat Enterprise Linux) Run the following commands:

...

Log In To The Database

Test the new password by logging in to the database.

You are prompted for your new password.

Allan Barku

People are often unreasonable and self-centered. Forgive them anyway. If you are kind, people may accuse you of ulterior motives. Be kind anyway. If you are honest, people may cheat you. Be honest anyway. If you find happiness, people may be jealous. Be happy anyway.

1 comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Follow us

Don't be shy, get in touch. We love meeting interesting people and making new friends.

Most discussed

%d bloggers like this: