Last answered:

02 Dec 2021

Posted on:

02 Dec 2021

0

How can I recover the root password/RESET the password/ create a new password?

How can I recover the root password/RESET the password/ create a new password?

1 answers ( 0 marked as helpful)
Posted on:

02 Dec 2021

1

Hello Sam,

Thank you for reaching out!

For Windows users:

There’s one extremely important thing to remember during the installation process, and it is the password you are going to set!

Although it is possible to change it later, it might not be the easiest thing to do. In such occasions, reinstallation of the software could sometimes be the quickest option.

Basically, if you need to reset your password, it’s best to read through Section B.4.3.2.1 from the following link:

https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html

There, you will find a seven-step process provided by the creators of the software, so it is as good as it can be.

Remember that if you find it too complicated or there's something that doesn't work as indicated in the steps, you could uninstall MySQL completely, and install it again, this time remembering your password.



For Mac users:

Execute the following commands:

  1. sudo/usr/local/mysql/support-files/mysql.server stop to stop the server if it is
    running.
  2. sudo mysqld_safe --skip-grant-tables to
    start the server in safe mode.

Then, open a new terminal and try the
following commands.

mysql -u root to log in without a
 password.

Back to the Table of Contents

FLUSH PRIVILEGES;ALTER USER
'root'@'localhost' IDENTIFIED BY '
';



to update the user’s password and

  1. sudo
    /usr/local/mysql/support-files/mysql.server start to start the server.





Kind regards,

The 365 Team

Submit an answer