7.2.2

    맥에서는 Homebrew를 통해 MySQL을 설치하는 것이 좋습니다. Homebrew는 다음 명령어로 설치할 수 있습니다.

    콘솔

    $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

    Homebrew 설치를 완료하고 나면 Homebrew를 통해 MySQL을 설치합니다.

    콘솔

    $ brew install mysql
    $ brew services start mysql
    $ mysql_secure_installation

    Note ≣ 권한 에러 발생 시

    설치 중에 다음과 같은 권한 에러가 발생할 수 있습니다.

    콘솔

    Error: The following directories are not writable by your user:
    /usr/local/share/info
    
    You should change the ownership of these directories to your user.
      sudo chown -R $(whoami) /usr/local/share/info
    
    And make sure that your user has write permission.
      chmod u+w /usr/local/share/info

    이때는 에러 메시지에 나온 대로 명령어를 입력하면 됩니다. 사용자의 환경에 따라 입력해야 하는 명령어가 달라질 수 있습니다.

    콘솔

    $ sudo chown -R $(whoami) /usr/local/share/info
    $ chmod u+w /usr/local/share/info
    신간 소식 구독하기
    뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.