2小时快速上手SpringBoot-数据库连接失败


  1. 跟着老师配置一步一步来,application-dev.yml配置如下

server:
  port: 8081
  servlet:
    context-path: /luckymoney

limit:
  minMoney: 0.01
  maxMoney: 9999
  description: 最少要发${limit.minMoney}元,最多要发${limit.maxMoney}元

spring:
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://localhost:3306/luckymoney
    username: root
    password: 0625
  jpa:
    hibernate:
      ddl-auto: create
    show-sql: true

2. 使用navicat建立数据库luckymoney

3. 运行程序还是出现报错如下:

https://img.mukewang.com/5d5a97ea00012b5c17740745.png

4. 

ERROR 11916 --- [           main] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Exception during pool initialization.

5.

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

Mr_yan_
浏览 1394回答 1
1回答

pardon110

帐号密码不对
打开App,查看更多内容
随时随地看视频慕课网APP