티스토리 뷰

OS/Mac

macOS에서 Mysql 5.7 수동설치

후늬뉨 2020. 4. 17. 14:12

표프의 교육실습환경을 구성할때 mysql 을 셋팅한 이력을 남겨본다.
미리 스키마와 데이터가 imort가 된 상태로 (실습환경을 위한) mysql을 배포해야할때 도커없이 수동설치하는 방법이다.
도커를 사용하면 좋겠지만, 교육장은 인터넷이 안된다..

1. mysql 다운로드를 한다.
https://downloads.mysql.com/archives/community/

 

MySQL :: Download MySQL Community Server (Archived Versions)

Please note that these are old versions. New releases will have recent bug fixes and features! To download the latest release of MySQL Community Server, please visit MySQL Downloads. MySQL open source software is provided under the GPL License.

downloads.mysql.com

2. 특정경로에 tar 압축해제

3. data 폴더생성 및 폴더권한 부여
mkdir data
chmod 777 data

3. 비번없는 root계정으로 초기화하기

bin/mysqld --defaults-file=/Users/EGOV/mysql/mysql-5.7.28-macos10.14-x86_64_hhjeong/mv.cnf --initialize-insecure --user=root --basedir=/Users/EGOV/mysql/mysql-5.7.28-macos10.14-x86_64_hhjeong/ --datadir=/Users/EGOV/mysql/mysql-5.7.28-macos10.14-x86_64_hhjeong/data

4. 서버시작
/Users/EGOV/mysql/mysql-5.7.28-macos10.14-x86_64_hhjeong/support-files/mysql.server start

5. 서버종료
/Users/EGOV/mysql/mysql-5.7.28-macos10.14-x86_64_hhjeong/support-files/mysql.server stop

참조문서 : https://dev.mysql.com/doc/refman/5.7/en/data-directory-initialization.html#data-directory-initialization-overview

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
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 31
글 보관함