> brew install mariadb
Maria DB start
> brew services start mariadb
Maria DB stop
> brew services stop mariadb
> brew services
or
> brew services list
- 아래와 같은 결과값일 경우 실행 중
Name Status User File
mariadb started UserName ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist
- 아래와 같은 결과값일 경우 실행 중 아님
Name Status User File
mariadb none
brew의 Maria DB가 start 상태여야 실행 가능
> mariadb
> mariadb -u root -p
MariaDB [(none)]> use mysql
- MySQL 5.7.6 and later:
MariaDB [mysql]> set password for 'root'@'localhost' = PASSWORD('바꿀 비밀번호');
- MySQL 5.7.5 and earlier:
MariaDB [mysql]> ALTER USER 'root'@'localhost' IDENTIFIED BY '바꿀 비밀번호';
MariaDB [mysql]> flush privileges;
MariaDB [mysql]> quit;
MariaDB [(none)]> SELECT User, Host FROM mysql.user;
or
MariaDB [(none)]> use mysql
MariaDB [mysql]> SELECT User, Host FROM user;