Created
June 28, 2021 13:28
-
-
Save kangmasjuqi/74304580c438a5cedc7fe83ec5b9bb61 to your computer and use it in GitHub Desktop.
force update the mysql root credential
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
# bismillah, shollallahu 'alaa Muhammad | |
# force update the mysql root credential | |
# | |
# mysql Ver 14.14 Distrib 5.7.30 | |
# on macos10.14 (x86_64) | |
# step 1 : find and kill the PID of the mysql process | |
ps aux | grep mysqld | |
kill -9 [PID] | |
# step 2 : entering mysql console | |
sudo mysqld_safe --skip-grant-tables --skip-networking | |
mysql -uroot | |
# step 3 : update root credential | |
update mysql.user set authentication_string=password('YOUR_NEW_PASSWORD') where user='root'; | |
flush privileges; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment