Skip to main content Link Menu Expand (external link) Document Search Copy Copied

SQLException


java.sql.SQLException: Access denied for user 'root'@'218.155.35.113' (using password: YES)

gradle둜 λΉŒλ“œν•œ ν…ŒμŠ€νŠΈ νŒŒμΌμ„ λŒλ¦¬λŠ”λ° μœ„μ™€ 같은 μ—λŸ¬κ°€ λ°œμƒν–ˆμ—ˆλ‹€.

ν™•μΈν•΄λ³΄λ‹ˆ application.yml 파일이

server:
  servlet:
    encoding:
      force-response: true

spring:
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: ${DB_HOST}
    username: root
    password: ${DB_PASSWORD}

  jpa:
    show-sql: true
    database-platform: org.hibernate.dialect.MySQL8Dialect
    database: mysql
    hibernate.ddl-auto: update



μœ„μ™€ 같이, datasourceκ°€ ν™˜κ²½λ³€μˆ˜λ‘œ μž…λ ₯λ°›κ²Œλ” κ΅¬ν˜„ν–ˆμ—ˆκ³ , ν…ŒμŠ€νŠΈ μ†ŒμŠ€νŒŒμΌμ—μ„œλŠ” ν™˜κ²½λ³€μˆ˜κ°€ μ „λ‹¬λ˜μ§€ μ•Šμ•„μ„œ λ°œμƒν•œ 였λ₯˜μ˜€λ‹€.

λ”°λΌμ„œ, ν…ŒμŠ€νŠΈ νŒŒμΌμ„ μ‹€ν–‰ν•˜λŠ” μ†ŒμŠ€ νŒŒμΌμ—μ„œ ν™˜κ²½λ³€μˆ˜λ₯Ό μΆ”κ°€ν•΄μ€¬λ”λ‹ˆ, μ •μƒμ μœΌλ‘œ μ‹€ν–‰λ˜μ—ˆλ‹€. (ν˜Ήμ€, application νŒŒμΌμ—λ‹€ 직접 μž…λ ₯해도 λœλ‹€.)