Wecode - Foundation 1 (부트캠프)/MySQL (데이터베이스 만듦_terminal 이용)

[Mac] MySQL 설치

JBS 12 2023. 9. 1. 08:20

설치하면서 티스토리를 남겨서, 캡쳐본을 완벽하게 남겨두었는데, 

컨디션 난조로 임시저장 후 날라갔다.. 아쉽게도 캡쳐본이 없다..


 

mySQL 공식 사이트에서도 다운로드 가능하지만,

 

맥북의 경우 homebrew를 통해 보다 간단하게 설치할 수 있다. 

 

MySQL :: Download MySQL Community Server

Select Version: 8.1.0 Innovation 8.0.34 5.7.43 Select Operating System: Select Operating System… Microsoft Windows Ubuntu Linux Debian Linux SUSE Linux Enterprise Server Red Hat Enterprise Linux / Oracle Linux Fedora Linux - Generic Oracle Solaris macOS

dev.mysql.com

 

 

 

 

터미널을 열고, 

 

1. mysql 서버 설정 
(mysql 시작) 

mysql.server start

 

(나는 이 단계를 거치치 않아서, 패스워드 단계 설정하는 절차가 나오지 않고 이상하게 작동했다) 

 

 

2. mysql 설치 명령어 입력

mysql_secure_installation

 

 

3. 비밀번호 복잡도 단계 물어본다
--> No 

 

Securing the MySQL server deployment. Connecting to MySQL using a blank password. VALIDATE PASSWORD PLUGIN can be used to test passwords and improve securitNy. It checks the strength of password and allows the users to set only those passwords which are secure enough. Would you like to setup VALIDATE PASSWORD plugin? Press y|Y for Yes, any other key for No:

 

4. 비밀번호 입력

Please set the password for root here. New password: Re-enter new password:

 

(1111 과 같이 쉽게 하려다가, root password 이기에 나만 아는 암호로, 틀리지 않게 치기) 

비밀번호 타이핑하는 건 안 나오는게 정상이다) 

 

 

5. 익명 사용자 삭제?
--> yes  

By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? (Press y|Y for Yes, any other key for No) : y

 

6. 원격 접속 허용하지 않는가?
--> yes 

Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y

 

7. test db 삭제
--> no 

By default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? (Press y|Y for Yes, any other key for No)

 

8. previlege reload? 
--> yes 

Reload previlege tables now? (Press y|Y for Yes, any other key for No) :

 

All done! 이 나오면 완료된거다. 

 

굉장히 성취감 있던 화면 캡쳐한 것을 

날려서 아쉽다.