Skip to content

Instantly share code, notes, and snippets.

@SunDi3yansyah
Last active November 9, 2018 16:59

Revisions

  1. SunDi3yansyah revised this gist Oct 31, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion shell.md
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ mysql > SELECT User, Host FROM mysql.user;
    mysql > DROP USER 'root'@'localhost';
    ```
    ```
    mysql > CREATE USER 'root'@'localhost' IDENTIFIED BY '';
    mysql > CREATE USER 'root'@'localhost' IDENTIFIED BY 'STRING-PASSWORD-NYA';
    ```
    ```
    mysql > GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;
  2. SunDi3yansyah created this gist Aug 25, 2017.
    24 changes: 24 additions & 0 deletions shell.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    ```
    $ > sudo mysql -uroot
    ```
    ```
    mysql > SELECT User, Host FROM mysql.user;
    ```
    ```
    mysql > DROP USER 'root'@'localhost';
    ```
    ```
    mysql > CREATE USER 'root'@'localhost' IDENTIFIED BY '';
    ```
    ```
    mysql > GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;
    ```
    ```
    mysql > FLUSH PRIVILEGES;
    ```
    ```
    mysql > exit
    ```
    ```
    $ > mysql -uroot
    ```