Last active
April 13, 2022 08:34
-
-
Save akhileshdarjee/c2fcd09a1381dd3342f2e6c0d5bbf043 to your computer and use it in GitHub Desktop.
Setup MySQL password after fresh installation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set MySQL password after fresh installation: | |
After fresh installation do not start, restart or stop mysql service. Do not run any commands which will affect MySQL in anyway. Run the below commands as soon as the installation is finished. If the below commands are not working then reinstall MySQL. | |
1. Login to MySQL | |
mysql -u root | |
2. Set Password | |
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new_password'; | |
3. Exit | |
mysql> exit | |
Note: | |
Replace 'new_password' with your desired password |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment