Skip to content

Latest commit

 

History

History
68 lines (56 loc) · 1.27 KB

mysql.md

File metadata and controls

68 lines (56 loc) · 1.27 KB

Run MySQL v5.7 on macOS

Install

brew install mysql@5.7

Start

brew services start mysql@5.7

Stop

brew services stop mysql@5.7

Post Installation

Verify MySQL v5.7 is running and accessible:

mysql -h 127.0.0.1 -P 3306 -u root

Within mysql shell, create user and password:

ALTER USER 'root'@'localhost' IDENTIFIED BY 'root';
CREATE USER 'temporal'@'localhost' IDENTIFIED BY 'temporal';
GRANT ALL PRIVILEGES ON *.* TO 'temporal'@'localhost';

Verify password:

mysql -h 127.0.0.1 -P 3306 -u root -p
mysql -h 127.0.0.1 -P 3306 -u temporal -p

TLS

TLS Key / Cert Setup Guide

emacs /usr/local/etc/my.cnf

setting the variables below to

require_secure_transport=ON
ssl-ca=<path to the server-cert.pem>
ssl-cert=<path to the server-cert.pem>
ssl-key=<path to the server-key.pem>
ALTER USER 'root'@'localhost' IDENTIFIED BY 'root' REQUIRE X509;
ALTER USER 'temporal'@'localhost' IDENTIFIED BY 'temporal' REQUIRE X509;

then restart MySQL:

brew services restart mysql@5.7

Verify TLS & password:

mysql -u root -p \
  --ssl-cert=<path to the client-cert.pem> \
  --ssl-key=<path to the client-key.pem> \
  --ssl-ca=<path to the ca.pem>