Last active
May 13, 2022 12:27
-
-
Save iambudi/1c22b69f49703338cd8b785a45c460f2 to your computer and use it in GitHub Desktop.
Revisions
-
iambudi renamed this gist
May 13, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -7,4 +7,4 @@ ALTER USER 'root'@'localhost' IDENTIFIED BY 'ReplaceNewPassHere'; 3. Run mysql service `mysqld --init-file=/Users/iambudi/reset_pass.txt` 4. Connect to mysql using the new password When things goes okay, delete the `reset_pass.txt`, stop and start mysql again. -
iambudi created this gist
May 13, 2022 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ 1. Make sure mysql service stopped `mysql.server stop` or `brew services stop mysql` 2. Create a text file somewhere ex. `/Users/iambudi/reset_pass.txt` and write this one liner sql to the file: ```sql ALTER USER 'root'@'localhost' IDENTIFIED BY 'ReplaceNewPassHere'; ``` 3. Run mysql service `mysqld --init-file=/Users/iambudi/reset_pass.txt` 4. Connect to mysql using the new password When things goes okay, delete the reset_pass.txt, stop and start mysql again.