Skip to content

Instantly share code, notes, and snippets.

@joshuabalduff
Created September 17, 2019 15:31
Show Gist options
  • Save joshuabalduff/95d631a0d0e13fabfbb1e7324307b8ab to your computer and use it in GitHub Desktop.
Save joshuabalduff/95d631a0d0e13fabfbb1e7324307b8ab to your computer and use it in GitHub Desktop.

Revisions

  1. @joshmello joshmello renamed this gist Sep 17, 2019. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. @joshmello joshmello created this gist Sep 17, 2019.
    49 changes: 49 additions & 0 deletions MySql_macOS_Catalina.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,49 @@
    ## Install MySQL on macOS Catalina
    This procedure explains how to install [MySQL](https://www.mysql.com) using [Homebrew](http://brew.sh) on macOS Catalina

    ### Install Homebrew
    * Installing Homebrew is effortless, open Terminal and enter :
    `$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"`
    * **Note:** Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

    ### Install MySQL
    At this time of writing, Homebrew has MySQL version **5.7.15** as default formulae in its main repository :

    * Enter the following command : `$ brew info mysql`
    * Expected output: **mysql: stable 5.7.15 (bottled)**

    To install MySQL enter : `$ brew install mysql`

    ## Additional configuration
    ### Homebrew

    * Install **brew services** first : `$ brew tap homebrew/services`
    * Load and start the MySQL service : `$ brew services start mysql`.
    Expected output : **Successfully started `mysql` (label: homebrew.mxcl.mysql)**

    * Check of the MySQL service has been loaded : `$ brew services list` <sup>[1](#1)</sup>

    * Verify the installed MySQL instance : `$ mysql -V`.
    Expected output : **Ver 14.14 Distrib 5.7.15, for osx10.12 (x86_64)**

    ### MySQL
    Open Terminal and execute the following command to set the root password:
    `mysqladmin -u root password 'yourpassword'`

    > **Important** : Use the single ‘quotes’ to surround the password and make sure to select a strong password!
    ### Database Management
    To manage your databases, I recommend using [Sequel Pro](http://www.sequelpro.com), a MySQL management tool designed for macOS.
    Current version available: **1.1.2**

    ### Issues with SequePro
    You will need to use native passowrd `Strong Password Encryption` which is a new feature in MySQL 8 causes the issue `ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'newpassword';`


    ##### Comments
    <a name="1"><sup>1</sup></a> The `brew services start mysql` - instruction is equal to :

    ```
    $ ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
    $ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
    ```