create user 'won'@'%' identified by '{password}';
GRANT ALL PRIVILEGES ON *.* TO 'won'@'%';
CREATE DATABASE camp CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
use camp;
username : won
password : {password} 부분에 작성
DB 이름 : camp
으로 설정해주었다.
각 라인을 ctrl + enter를 해주면...
이렇게 4개 항목이 다 성공했다면 MySQL 세팅 완료 !
pom.xml
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<scope>runtime</scope>
</dependency>
mysql 의존성 추가
application.yml
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/camp?serverTimezone=Asia/Seoul
username: won
password: {password}
username, password를 위에 작성했던 create user 'won'@'%' identified by '{password}'
정보로 설정