Skip to content

Install MySQL on OS X El Capitan

Greg Kostin edited this page Jul 5, 2017 · 3 revisions

Reference: nrollr/MySQL.md

brew update

167:~ gkostin$ brew update
Already up-to-date.

brew info mysql

167:~ gkostin$ brew info mysql
mysql: stable 5.7.18 (bottled)
Open source relational database management system
https://dev.mysql.com/doc/refman/5.7/en/
Conflicts with:
  mariadb (because mysql, mariadb, and percona install the same binaries.)
  mariadb-connector-c (because both install plugins)
  mysql-cluster (because mysql, mariadb, and percona install the same binaries.)
  mysql-connector-c (because both install MySQL client libraries)
  percona-server (because mysql, mariadb, and percona install the same binaries.)
/usr/local/Cellar/mysql/5.7.15 (13,510 files, 445.9MB)
  Poured from bottle on 2016-09-13 at 08:14:14
/usr/local/Cellar/mysql/5.7.17 (321 files, 234.4MB) *
  Poured from bottle on 2017-03-29 at 16:01:54
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/mysql.rb
==> Dependencies
Build: cmake ✘
Required: openssl ✔
==> Requirements
Required: macOS >= 10.7 ✔
==> Options
--with-archive-storage-engine
	Compile with the ARCHIVE storage engine enabled
--with-blackhole-storage-engine
	Compile with the BLACKHOLE storage engine enabled
--with-debug
	Build with debug support
--with-embedded
	Build the embedded server
--with-local-infile
	Build with local infile loading support
--with-test
	Build with unit tests
==> Caveats
We've installed your MySQL database without a root password. To secure it run:
    mysql_secure_installation

MySQL is configured to only allow connections from localhost by default

To connect run:
    mysql -uroot

To have launchd start mysql now and restart at login:
  brew services start mysql
Or, if you don't want/need a background service you can just run:
  mysql.server start

brew upgrade mysql

167:~ gkostin$ brew upgrade mysql
==> Upgrading 1 outdated package, with result:
mysql 5.7.18_1
==> Upgrading mysql
==> Downloading https://homebrew.bintray.com/bottles/mysql-5.7.18_1.el_capitan.b
######################################################################## 100.0%
==> Pouring mysql-5.7.18_1.el_capitan.bottle.tar.gz
==> Using the sandbox
==> Caveats
We've installed your MySQL database without a root password. To secure it run:
    mysql_secure_installation

MySQL is configured to only allow connections from localhost by default

To connect run:
    mysql -uroot

To have launchd start mysql now and restart at login:
  brew services start mysql
Or, if you don't want/need a background service you can just run:
  mysql.server start
==> Summary

brew services start mysql

$ brew services start mysql
You can’t perform that action at this time.