WebServer&DB&CTI
[데이터베이스]MySQL사용 (macOS)
개발하는라푼젤
2022. 8. 8. 20:28
728x90
Homebrew를 이용한 MySQL설치
brew install mysql
brew info mysql
MySQL시작
brew services start mysql
//또는
mysql.server start
MySQL접속
mysql -u root
비번 1234라도하자ㅏㅏㅏㅏ
MySQL 설치에러(맥북M1)
- Cannot install in Homebrew on ARM processor in Intel default prefix (/usr/local)! 에러 핸들링 방법
(brew install mysql 후에)
$ /opt/homebrew/bin/brew doctor
$ echo 'export PATH="/opt/homebrew/bin:$PATH"' >> ~/.zshrc
(MySQL 서비스 시작해주세요)
- (Mac) 재설치 시 삭제 명령어
- MySQL 서비스 종료
$ brew services stop mysql
- Brew로 삭제, Clean up
$ brew remove mysql
$ brew cleanup
- 남아있는 mysql 정보 삭제
$ sudo rm -rf /usr/local/var/mysql
(M1 사용자는 추가적으로 sudo rm -rf /opt/local/var/mysql)
$ sudo rm -rf /usr/local/mysql
(M1 사용자는 추가적으로 sudo rm -rf /opt/local/mysql)
$ sudo rm -rf /Library/StartupItems/MySQLCOM
$ sudo rm -rf /Library/PreferencePanes/MySql
(다시 처음부터 설치 진행해주세요)
SQL GUI Support Tool
MySQL :: MySQL Workbench
MySQL Workbench is a unified visual tool for database architects, developers, and DBAs. MySQL Workbench provides data modeling, SQL development, and comprehensive administration tools for server configuration, user administration, backup, and much more. My
www.mysql.com