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?
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:
sudo/usr/local/mysql/support-files/mysql.server stop
to stop the server if it is
running.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
- sudo
/usr/local/mysql/support-files/mysql.server start to start the server.
Kind regards,
The 365 Team