Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save alimranahmed/3056dbd0f143ff205369ef941655d238 to your computer and use it in GitHub Desktop.

Select an option

Save alimranahmed/3056dbd0f143ff205369ef941655d238 to your computer and use it in GitHub Desktop.

Revisions

  1. alimranahmed revised this gist Jan 18, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Give remote and password access to a database.md
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@ GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY 'password';
    FLUSH PRIVILEGES;
    ```

    For changing from sudo accessible to password accessible(auth_socket to mysql_native_password)
    For changing from sudo accessible to password accessible(`auth_socket` to `mysql_native_password`)
    ----------------------------------------------------------------------------------------------------
    ```
    mysql –u root -p
  2. alimranahmed revised this gist Jan 18, 2021. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions Give remote and password access to a database.md
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,15 @@
    To access from remote
    ---------------------------------
    ```
    mysql –u root -p
    GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY 'password';
    FLUSH PRIVILEGES;
    ```

    For changing from sudo accessible to password accessible(auth_socket to mysql_native_password)
    ----------------------------------------------------------------------------------------------------
    ```
    mysql –u root -p
    ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
    FLUSH PRIVILEGES;
    ```
  3. alimranahmed renamed this gist Jan 18, 2021. 1 changed file with 0 additions and 0 deletions.
  4. alimranahmed revised this gist Jan 18, 2021. 2 changed files with 11 additions and 3 deletions.
    3 changes: 0 additions & 3 deletions Give remote access to a database
    Original file line number Diff line number Diff line change
    @@ -1,3 +0,0 @@
    mysql –u root -p
    GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY 'password';
    FLUSH PRIVILEGES;
    11 changes: 11 additions & 0 deletions Give remote and password access to a database
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    To access from remote
    ---------------------------------
    mysql –u root -p
    GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY 'password';
    FLUSH PRIVILEGES;

    For changing from sudo accessible to password accessible(auth_socket to mysql_native_password)
    ----------------------------------------------------------------------------------------------------
    mysql –u root -p
    ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
    FLUSH PRIVILEGES;
  5. alimranahmed created this gist Jun 9, 2020.
    3 changes: 3 additions & 0 deletions Give remote access to a database
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    mysql –u root -p
    GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY 'password';
    FLUSH PRIVILEGES;