Created
September 18, 2020 00:22
-
-
Save ulmaull/f73ceab9f4b2bc93f9a9688f5fe46085 to your computer and use it in GitHub Desktop.
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 characters
| ``` | |
| $ > sudo mysql -uroot | |
| ``` | |
| ``` | |
| mysql > SELECT User, Host FROM mysql.user; | |
| ``` | |
| ``` | |
| mysql > DROP USER 'root'@'localhost'; | |
| ``` | |
| ``` | |
| mysql > CREATE USER 'root'@'localhost' IDENTIFIED BY 'STRING-PASSWORD-NYA'; | |
| ``` | |
| ``` | |
| mysql > GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION; | |
| ``` | |
| ``` | |
| mysql > FLUSH PRIVILEGES; | |
| ``` | |
| ``` | |
| mysql > exit | |
| ``` | |
| ``` | |
| $ > mysql -uroot | |
| ``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment