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
- 쿠키로그인
- 게시판
- 네팔
- Spring
- 알고리즘
- mysql
- openAI
- springboot
- 로그인
- spring boot
- Java
- fastapi
- LV2
- 커밋 메시지
- OOM
- 해외봉사
- Dockerfile
- cors
- 회고
- 프로젝트
- 우테코
- crud
- 코딩테스트
- Lv.2
- 부트스트랩
- 프로그래머스
- llm
- docker
- 세션로그인
- 서버 꺼짐
Archives
- Today
- Total
s00jin 님의 블로그
1. [MySQL/SpringBoot] 로컬 MySQL 연결하기 본문
1. 로컬 MySQL 데이터베이스 생성
로컬 MySQL에 데이터베이스를 먼저 만들고, 연결을 진행한다.
2. application.properties
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/[database명]
serverTimezone=Asia/Seoul
spring.datasource.username=[username]
spring.datasource.password=[password]
spring.jpa.properties.hibernate.show_sql=true
spring.jpa.properties.hibernate.format_sql=true
spring.jpa.hibernate.ddl-auto=create
spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect
3. build.gradle에 추가
// mysql
implementation 'mysql:mysql-connector-java:8.0.32'
위 코드를 추가해주고 새로고침 해준다.
'프로젝트 > 하고 싶은거 다해보는 내 사이트' 카테고리의 다른 글
| 4. [로그인] 세션 로그인 구현하기 - Spring/SpringBoot (1) | 2025.07.07 |
|---|---|
| 3-1. [로그인/에러] 쿠키 로그인 시 500 에러 (whitelabel error page / 500) (0) | 2025.07.01 |
| 3. [로그인] 쿠키 로그인 구현하기 - Spring/SpringBoot (0) | 2025.07.01 |
| 2. [로그인] 로그인 구현 전 설계하기 (0) | 2025.06.26 |
| 0. [SpingBoot] 초기 설정 및 서버 헬스 체크 구현하기 (0) | 2025.06.26 |