본문 바로가기

서버

mac m1에서 mariadb 재설치

728x90

1. mariadb 종료하기

brew services stop mariadb

 

2. mariadb brew로 제거하기

brew uninstall mariadb

 

3. mariadb 설정 파일 모두 제거하기

cd /opt/homebrew/var
rm -rf mysql

 

 

3-1. mariadb 설정 파일 모두 제거하기

cd /opt/homebrew/etc
rm -rf my.cnf*

 

4. brew로 설치하기

brew install mariadb

 

 

5. mariadb 켜서 확인하기

brew services start mariadb

 

brew services list

 

6. 실행하기

mariadb

 

 

7. 실행 확인 후 나가기

exit

 

 

8. 비번 셋팅하기

 

sudo mariadb-secure-installation

 

password 설정은 알아서 한 뒤에

나머지는 엔터 누르면 됩니다.

 

9. 접속하기

mysql -u root -p