Fork me on GitHub

Project Notes

#197 MySQL on MacOS

Notes on installing and running MySQL on MacOS

Notes

Installing with brew

$ brew install mysql
mysql.server start
$ mysql.server status
 SUCCESS! MySQL running (708)
$ brew info mysql
mysql: stable 8.0.18 (bottled)
Open source relational database management system
https://dev.mysql.com/doc/refman/8.0/en/
Conflicts with:
  mariadb (because mysql, mariadb, and percona install the same binaries.)
  percona-server (because mysql, mariadb, and percona install the same binaries.)
/usr/local/Cellar/mysql/8.0.18_1 (287 files, 280.7MB) *
  Poured from bottle on 2020-01-09 at 12:23:59
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/mysql.rb
==> Dependencies
Build: cmake ✔
Required: openssl@1.1 ✔, protobuf@3.7 ✔
==> Requirements
Required: macOS >= 10.10 ✔
==> 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
==> Analytics
install: 68,390 (30 days), 212,385 (90 days), 839,501 (365 days)
install-on-request: 64,928 (30 days), 201,710 (90 days), 785,465 (365 days)
build-error: 0 (30 days)

Locations

  • /usr/local/opt/mysql - binaries, linked to ../Cellar/mysql/8.0.18_1
  • /usr/local/var/mysql - data

Credits and References

About LCK#197 DatabaseMySQL

This page is a web-friendly rendering of my project notes shared in the LittleCodingKata GitHub repository.

Project Source on GitHub Return to the LittleCodingKata Catalog
About LittleCodingKata

LittleCodingKata is my collection of programming exercises, research and code toys broadly spanning things that relate to programming and software development (languages, frameworks and tools).

These range from the trivial to the complex and serious. Many are inspired by existing work and I'll note credits and references where applicable. The focus is quite scattered, as I variously work on things new and important in the moment, or go back to revisit things from the past.

This is primarily a personal collection for my own edification and learning, but anyone who stumbles by is welcome to borrow, steal or reference the work here. And if you spot errors or issues I'd really appreciate some feedback - create an issue, send me an email or even send a pull-request.

Follow the Blog follow projects and notes as they are published in your favourite feed reader