https://downloads.mysql.com/archives/installer/
MySQL :: Download MySQL Installer (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 Installer, please visit MySQL Downloads. MySQL open source software is provided under the GPL License.
downloads.mysql.com
위 링크에서 mySQL 8.0.32버전을 다운받습니다.
설치과정에서 다른 설정은 건들지 않았습니다.
(설치 중간에 root 비밀번호는 설정해야 합니다)
설치가 완료되면 Workbench를 실행합니다.
동그라미 친 버튼을 클릭하여 스키마를 생성합니다. Name은 test로 설정하였습니다.
이후 아래에 있는 apply버튼을 눌러 적용합니다.
이후, 상단바에서 Server-Users and Privileges를 클릭합니다
좌측하단의 Add Account를 누르고, name을 설정해줍니다.
Administrative Roles 탭을 클릭하여 모든 권한을 체크하고 적용합니다.
이후, Schema Privileges 탭을 클릭합니다
우측 Add Entry...버튼을 클릭합니다
Selected schema에서 아까 생성해뒀던 test스키마를 선택하고 ok합니다.
아래의 모든 권한을 체크하고 적용합니다.
여기까지 마쳤다면, 다시 워크벤치 홈으로 이동합니다.
+버튼을 눌러 커넥션을 생성합니다.
커넥션 네임과 유저네임을 각각 test로 설정하였습니다.
이제 application.yml을 확인합니다.
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/{schema name}?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8&useSSL=true
username: {username}
password: {userpassword}
위와 같이 설정되어 있으면 됩니다.
본 포스팅에서는 스키마 네임, 유저네임을 test로 설정했고, 패스워드는 비워두었으므로 다음과 같이 적혀있으면 됩니다.
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/test?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8&useSSL=true
username: test
password:
'웹개발 > SpringBoot' 카테고리의 다른 글
페이징 기능 적용하기 (0) | 2023.07.26 |
---|---|
swagger 작성해보기, Springboot swagger 연동하기 (0) | 2023.07.05 |
로그인 여부에 따라 바뀌는 로그인/로그아웃 버튼 만들기 (0) | 2023.05.27 |
@RequestBody를 적어야 됐던 일 (1) | 2023.05.18 |
[JPA] 엔티티 수정시 Dirty checking(변경 감지), Merge(병합) (0) | 2023.05.07 |
댓글