[MySQL] M1 Mac Homebrew로 MYSQL 설치하기

김태인·2022년 10월 18일
0
post-thumbnail

Homebrew에서 패키지를 설치하기 전에 아래 명령어로 패키지 최신 버전 정보를 가져옴과 동시에 갱신한다

brew update

다음 명령어로 MySQL을 설치

brew install mysql

설치 완료 후 다음 명렁어로 MySQL 실행

brew services start mysql

다음 명령어를 입력하고 비밀번호를 입력하면 MySQL 로그인 가능 (나는 root로 되어있음)

  • 비밀번호는 절때 까먹으면 안된다!

MySQL 설정

mysql_secure_installation

1-1 Validate Password 설정 여부

Would you like to setup VALIDATE PASSWORD component? Press y|Y for Yes, any other key for No: no

1-2 Anonymous Users 삭제 여부

Remove anonymous users? (Press y|Y for Yes, any other key for No) : no

1-3 원격 IP접속 허용 여부

Disallow root login remotely? (Press y|Y for Yes, any other key for No) : yes

1-4 기본 DB test 유지 여부

Remove test database and access to it? (Press y|Y for Yes, any other key for No) : no

1-5 변경된 설정 내역을 즉시 적용할 건지

Reload privilege tables now? (Press y|Y for Yes, any other key for No) : yes

MySQL 접속

mysql -u [아이디명] - p

MySQL 프로그램 종료 명령문은 아래와 같다

brew services stop mysql

MySQL 워크벤치 설치

brew install mysql-client
brew cask install mysqlworkbench

오류가 발생할경우

brew install --cask mysqlworkbench
profile
코딩이 취미가 되는 그날까지

0개의 댓글