본문 바로가기

Mac mysql3

[MAC] mysql database생성하기 1. mysql 시작 $ brew services start mysql // mysql 시작 $ mysql -uroot // mysql 모니터로 들어가기 2. mysql 에 기본적으로 생성되는 데이터베이스는 다음과 같다. mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | sys | +--------------------+ 3. 새로운 데이터베이스를 추가하기 위해서 다음의 명령어 사용 mysql> create database 원하는이름; Query OK, 1 row affected // 이 메세지가 뜨면 잘 .. 2022. 1. 17.
[MAC] homebrew mysql 설치 / 삭제 mac homebrew 에 mysql 설치하는 법 1. homebrew 가 없다면 home brew 설치 $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 2. brew 업데이트 해주기 $ brew update 3. mysql 관련 프로그램 검색 (확인하는 명령어라 넘어가도 된다.) $ brew search mysql 4. mysql 설치 - 버전을 정해주고 싶다면 mysql@5.7 이렇게 버전 설정하기 $ brew install mysql 그리고 설치 될 때 문구를 한 번 싸악 봐준다. (에러를 줄일 수 있다) 5. mysql 실행 $ brew services start m.. 2022. 1. 12.
[MAC] homebrew mysql 설치 오류 해결 내가 만났던 오류메세지들 ERROR 1698 (28000): Access denied for user 'root'@'localhost' Error: mysql: Invalid bottle tag symbol Error: homebrew-core is a shallow clone. 등등등 더 많다. 온 구글을 돌아다니면서 이것저것 해보면서 더 많은 오류를 만나보고 완벽히 지우고 다시 깔았다. 우선 mysql> show databases; 를 했을 때 기본적으로 생성됐어야 할 db가 생성되지 않을 걸 확인한 후 처음부터 시작하기로 결심! 난 아래의 1. mysql start 를 했다면 stop 시킨다. brew services stop mysql 2. mysql 삭제 (버전이 있다면 mysql@5.7 이런식.. 2022. 1. 12.