Maria DB 설치 과정

0

MariaDB for django

목록 보기
1/2
post-thumbnail

명령어 입력 및 그에 따른 결과를 남겼다.
따라하는 중에 오류가 굉장히 많이 있었는데, 혹시나 해서 재부팅 해봤다.
놀랍게도 재부팅 후에는 MariaDB가 정상적으로 실행된다.

$ brew install mariadb

Error: Cannot install mariadb because conflicting formulae are installed.
mysql: because mariadb, mysql, and percona install the same binaries

Please brew unlink mysql before continuing.

Unlinking removes a formula's symlinks from /usr/local. You can
link the formula again after the install finishes. You can --force this
install, but the build may fail or cause obscure side effects in the
resulting software.

$ brew unlink mysql

Unlinking /usr/local/Cellar/mysql/8.0.27... 94 symlinks removed

$ brew install mariadb

MySQL is configured to only allow connections from localhost by default

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

 $ brew services start mariadb

==> Successfully started mariadb (label: homebrew.mxcl.mariadb)

$ mysql -u root -p

Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 8.0.27 Homebrew

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

$ Ctrl + C

MySQL [(none)]> Ctrl-C -- exit!

$ mysql.server start

Starting MariaDB
211208 22:11:36 mysqld_safe Logging to '/usr/local/var/mysql/MacBookPro.local.err'.
211208 22:11:36 mysqld_safe Starting mariadbd daemon with databases from /usr/local/var/mysql
SUCCESS!

$ brew services stop mariadb

==> Successfully stopped mariadb (label: homebrew.mxcl.mariadb)


🌏 macOS 에서 Homebrew를 통해 MariaDB설치 했을 때는?

macOS 에서 Homebrew를 통해 MariaDB설치 시
mysql.server '명령어' 대신 brew services '명령어' 사용

mysql.server start -> brew services start mariadb
mysql.server stop -> brew services stop mariadb
mysql.server status -> brew services list
만약 mysql.server start를 여러번 실행했다면
재부팅을 하지 않는한 프로세스가 종료되지 않는다

$ ps aux | grep mysql
상기 명령어로 나오는 모든 프로세스를

$sudo kill [pid] [pid] [pid] ...
이 명령어를 통해 한 번에 정리

이 때 프로세스 하나를 종료하는데 실패할 텐데 
그 프로세스는 grep으로 인한 프로세스이므로 
종료하는데 실패해야 정상

다시 ps명령어로 확인했을 떄 
grep으로 인한 프로세스 하나만 나와야 한다

Window에 HeidiSQL이 있다면 macOS에는 SequelPro가 있다
$ brew install homebrew/cask-versions/sequel-pro-nightly

🌏 오류에 대한 도움을 준 곳들
여기랑 / 여기

0개의 댓글