MySQL / MariaDB

MariaDB has replaced MySQL. By and large it’s backwards compatible, with mariadb and mysql commands and subvariants pretty much interchangeabe/aliased.

Installation

Already installed, via brew

Storage & Configs

Data storage is in /opt/homebrew/var/mysql

Config in /opt/homebrew/etc/my.cnf but nothing really there.

Operation

To restart, become hugh and execute brew services restart mariadb

Use mysql or mariadb command line client as usual.

Privileges

CREATE USER 'libmus'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE libmus;
GRANT ALL PRIVILEGES ON libmus.* TO 'libmus'@'localhost';
FLUSH PRIVILEGES;