Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 이메일 전송
- 객체
- 자바스크립트
- 카카오 소셜로그인
- AGGREGATE
- nest
- DB
- MongoDB
- 위크셋
- 카카오로그인
- Mongoose
- JSON.parse
- Map
- context switch
- JavaScript
- JSON.stringify
- 캐러셀
- react-slick
- 구조 분해 할당
- nestjs
- 로그스태시
- 참조에 의한 객체 복사
- 화살표 함수
- nextjs
- javacript
- 중첩 구조 분해
- nodemailer
- TypeScript
- logstash
- 위크맵
Archives
- Today
- Total
뚜sh뚜sh
SpringBoot와 MySQL 연결 본문
1. MySQL 서버 연결 후 접속(접속은 안해도 됨)
2. Sequel Pro를 실행해서 커넥션을 연결한 후 Add Database로 원하는 이름의 데이터베이스 생성
3. start.spring.io로 프로젝트를 생성할 때 dependencies에 MySQL Driver 추가
build.gradle 파일
dependencies {
runtimeOnly 'com.mysql:mysql-connector-j'
}
4. application.properties에 아래 코드 추가
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/[생성한 데이터베이스 이름]?serverTimezone=UTC&characterEncoding=UTF-8
spring.datasource.username=[name]
spring.datasource.password=[password]
'MySQL' 카테고리의 다른 글
VARCHAR과 LONGTEXT의 차이점과 사용법 (0) | 2024.03.18 |
---|---|
[ERROR] Sequel Pro "Loading database 'zz'" (0) | 2024.01.17 |
MySQL password 변경 (0) | 2024.01.17 |
MySQL GUI 툴 - Sequal Pro 설치 및 실행 (0) | 2024.01.16 |
[MacOS] MySQL 설치(Homebrew) (0) | 2024.01.16 |
Comments