MySQL zip 파일 설치 및 실행 (Windows 10 Pro x64)


설치 경로는 Y:\MySQL\5.7.22 아래에 한다고 가정함

  1. 해당 링크 클릭 MySQL Download

    • 5.7 버전으로 다운로드 함 (현재 8.0.11)
    • 8.x 버전에서 비밀번호 암호화 방식이 바뀐 듯(?), 예전 암호화 방식을 쓸 수 있도록 할 수 있지만 하지 않음
      추후 client 툴이 지원 되면 업데이트 해볼 것, (현재 sqlgate, workbench 등 로그인이 안됨)
    • Other Downloads 에서 ZIP Archive 로 받을 것
  2. 압축을 풀고자 하는 디렉터리로 이동 후 압축 풀기

  3. 환경변수 설정

    • 추가

      • 변수 명 : MYSQL_HOME
      • 변수 값 : Y:\MySQL\5.7.22
    • 편집

      • 변수 명 : Path
      • 변수 값 : %MYSQL_HOME%\bin
  4. ini 파일 설정

    • 5.7 이상 부터는 my-default.ini, my-small.ini, my-medium.ini 등의 파일들이 제공되지 않음

    • 5.6 에서 제공하는 my-default.ini 파일 참고하여 경로만 수정

      my.ini 설정
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      # For advice on how to change settings please see
      # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
      # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
      # *** default location during install, and will be replaced if you
      # *** upgrade to a newer version of MySQL.

      [mysqld]

      # Remove leading # and set to the amount of RAM for the most important data
      # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
      # innodb_buffer_pool_size = 128M

      # Remove leading # to turn on a very important data integrity option: logging
      # changes to the binary log between backups.
      # log_bin

      # These are commonly set, remove the # and set as required.
      basedir=Y:/MySQL/5.7.22
      datadir=Y:/MySQL/5.7.22/data_user
      port=3306
      # server_id = .....

      # Remove leading # to set options mainly useful for reporting servers.
      # The server defaults are faster for transactions and fast SELECTs.
      # Adjust sizes as needed, experiment to find the optimal values.
      # join_buffer_size = 128M
      # sort_buffer_size = 2M
      # read_rnd_buffer_size = 2M

      sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
    • utf8mb4 설정 참고

  5. 윈도우 서비스 등록 및 DB 데이터 초기화

    • 5.6 이상의 경우 아래 명령어로 DB 데이터 초기화

      명령어
      1
      mysqld -–initialize-insecure
    • 관리자 권한으로 cmd 창 실행 후 아래 명령어 입력

      명령어
      1
      mysqld --install [윈도우 서비스 명]
      예시
      1
      mysqld --install "MySQL 5.7.22"
  1. MySQL 실행

    • 윈도우 실행 창에서 services.msc 입력
    • 3번에서 설정한 윈도우 서비스 명을 찾아서 서비스 시작
  2. 계정 설정


[참고]
  1. 윈도우 서비스 제거
    • 관리자 권한으로 cmd 창 실행 후 아래 명령어 입력

      명령어
      1
      mysqld --remove [윈도우 서비스 명]
      예시
      1
      mysqld --remove "MySQL 5.7.22"
공유하기 댓글