Skip to content

Instantly share code, notes, and snippets.

@ulmaull
Created September 18, 2020 00:22
Show Gist options
  • Select an option

  • Save ulmaull/f73ceab9f4b2bc93f9a9688f5fe46085 to your computer and use it in GitHub Desktop.

Select an option

Save ulmaull/f73ceab9f4b2bc93f9a9688f5fe46085 to your computer and use it in GitHub Desktop.

Revisions

  1. ulmaull created this gist Sep 18, 2020.
    24 changes: 24 additions & 0 deletions Setting Mysql Without sudo
    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 'STRING-PASSWORD-NYA';
    ```
    ```
    mysql > GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;
    ```
    ```
    mysql > FLUSH PRIVILEGES;
    ```
    ```
    mysql > exit
    ```
    ```
    $ > mysql -uroot
    ```