Skip to content

Instantly share code, notes, and snippets.

@gembin
Last active April 16, 2020 19:08
Show Gist options
  • Save gembin/24649fcefb046bd91a9b41f7d2c4497c to your computer and use it in GitHub Desktop.
Save gembin/24649fcefb046bd91a9b41f7d2c4497c to your computer and use it in GitHub Desktop.

Revisions

  1. gembin revised this gist Apr 16, 2020. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions install_mysql_on_mac.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,7 @@ If you run into this error using GUI tools, e.g. **Sequel Pro**:
    Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(/usr/local/mysql/lib/plugin/caching_sha2_password.so, 2): image not found
    ```
    Then do the following steps:

    `vi /usr/local/etc/my.cnf` in section `[mysqld]` add line:
    ```
    default-authentication-plugin=mysql_native_password
  2. gembin created this gist Apr 16, 2020.
    30 changes: 30 additions & 0 deletions install_mysql_on_mac.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    ### Install
    ```bash
    brew install mysql
    brew tap homebrew/services
    brew services start mysql
    ```
    ### Configuration
    If you run into this error using GUI tools, e.g. **Sequel Pro**:
    ```
    Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(/usr/local/mysql/lib/plugin/caching_sha2_password.so, 2): image not found
    ```
    Then do the following steps:
    `vi /usr/local/etc/my.cnf` in section `[mysqld]` add line:
    ```
    default-authentication-plugin=mysql_native_password
    ```
    Login to mysql with `mysql -u root -p`:
    ```SQL
    ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your_password';
    ```
    And then restart:
    ```bash
    brew services restart mysql
    ```

    ### Stop
    ```bash
    brew services stop mysql
    ```