Skip to content

Instantly share code, notes, and snippets.

@qjawe
Forked from nrollr/MySQL.md
Created February 17, 2017 15:48
Show Gist options
  • Save qjawe/2de40d06b13d1e86c738579267b9ccac to your computer and use it in GitHub Desktop.
Save qjawe/2de40d06b13d1e86c738579267b9ccac to your computer and use it in GitHub Desktop.

Revisions

  1. @nrollr nrollr revised this gist Oct 10, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion MySQL.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    ## Install MySQL on OS X El Capitan (10.11)
    ## Install MySQL on OS X El Capitan
    Normally the installation of [MySQL](https://www.mysql.com) can be achieved with a single command, which executes a script provided by [MacMiniVault](https://github.com/MacMiniVault/Mac-Scripts) :
    `bash <(curl -Ls http://git.io/eUx7rg)`

  2. @nrollr nrollr revised this gist Oct 10, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions MySQL.md
    Original file line number Diff line number Diff line change
    @@ -35,10 +35,10 @@ Expected output : **Server version: 5.6.27 Homebrew**
    Quit the mysql CLI via `mysql> \q`

    ###Configure MySQL
    Open Terminal and execute the following command to set the root password: `mysqladmin -u root password 'yourpassword'`
    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 OS X
  3. @nrollr nrollr revised this gist Oct 10, 2015. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions MySQL.md
    Original file line number Diff line number Diff line change
    @@ -21,8 +21,9 @@ Open Terminal and execute the following commands :

    * To have launchd start mysql at login :
    `ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents`
    * To load mysql immediately : `launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist`
    * And Add the mysql directory to your PATH environment variable in `.bash_profile` :
    * To load mysql immediately :
    `launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist`
    * Finally add the mysql directory to your PATH environment variable in `.bash_profile` :

    ```
    export MYSQL_PATH=/usr/local/Cellar/mysql/5.6.27
  4. @nrollr nrollr revised this gist Oct 10, 2015. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion MySQL.md
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,8 @@ Next install MySQL with : `brew install mysql`
    ###Additional configuration
    Open Terminal and execute the following commands :

    * To have launchd start mysql at login : `ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents`
    * To have launchd start mysql at login :
    `ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents`
    * To load mysql immediately : `launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist`
    * And Add the mysql directory to your PATH environment variable in `.bash_profile` :

  5. @nrollr nrollr revised this gist Oct 10, 2015. 1 changed file with 1 addition and 3 deletions.
    4 changes: 1 addition & 3 deletions MySQL.md
    Original file line number Diff line number Diff line change
    @@ -4,10 +4,8 @@ Normally the installation of [MySQL](https://www.mysql.com) can be achieved with

    _However, at the time of writing the script is not compatible with OS X El Capitan (10.11)_



    #### Install MySQL using Homebrew
    The first alternative to the aforementioned installation script is installing MySQL using Homebrew. This gist assumes you already have Homebrew installed, if not **first read** the article "[Homebrew and El Capitan](http://t.co/goPLgP6GfD)"
    An alternative to the aforementioned installation script is installing MySQL using Homebrew. This gist assumes you already have Homebrew installed, if not **first read** the article "[Homebrew and El Capitan](http://t.co/goPLgP6GfD)"

    Make sure Homebrew has the latest formulae, so run `brew update` first
    **-OR-** make sure Homebrew has MySQL version 5.6.27 as default formulae in its main repository :
  6. @nrollr nrollr created this gist Oct 10, 2015.
    44 changes: 44 additions & 0 deletions MySQL.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,44 @@
    ## Install MySQL on OS X El Capitan (10.11)
    Normally the installation of [MySQL](https://www.mysql.com) can be achieved with a single command, which executes a script provided by [MacMiniVault](https://github.com/MacMiniVault/Mac-Scripts) :
    `bash <(curl -Ls http://git.io/eUx7rg)`

    _However, at the time of writing the script is not compatible with OS X El Capitan (10.11)_



    #### Install MySQL using Homebrew
    The first alternative to the aforementioned installation script is installing MySQL using Homebrew. This gist assumes you already have Homebrew installed, if not **first read** the article "[Homebrew and El Capitan](http://t.co/goPLgP6GfD)"

    Make sure Homebrew has the latest formulae, so run `brew update` first
    **-OR-** make sure Homebrew has MySQL version 5.6.27 as default formulae in its main repository :

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

    Next install MySQL with : `brew install mysql`


    ###Additional configuration
    Open Terminal and execute the following commands :

    * To have launchd start mysql at login : `ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents`
    * To load mysql immediately : `launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist`
    * And Add the mysql directory to your PATH environment variable in `.bash_profile` :

    ```
    export MYSQL_PATH=/usr/local/Cellar/mysql/5.6.27
    export PATH=$PATH:$MYSQL_PATH/bin
    ```

    * Reload shell and type `mysql -v` to confirm
    Expected output : **Server version: 5.6.27 Homebrew**
    Quit the mysql CLI via `mysql> \q`

    ###Configure 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 OS X