[SOLVED] Access denied for user '[email protected]'localhost' (using password: NO) in spring

Issue

I am trying to create a java spring application with mysql conenction and I am receiving this error :

Access denied for user 'aurelian'@'localhost' (using password: NO)

Mind you that I have user/password and in my application properties, I have my server on, and the password it is correct:

     `######## Database Properties #######
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/spring_reddit_clone
spring.datasource.username=aurelian
spring.datasourxce.password=XXXXXXXXXXXXXX
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
spring.jpa.hibernate.ddl-auto=update
spring.datasource.initialize=true
spring.jpa.show-sql=true**strong text**`

Also I am using mysql-connector-java-8.0.25.jar so I do not have any ideeas.

Best Regards,
Aurelian

Solution

Typo alert.

Change datasourxce to datasource

spring.datasource.password=XXXXXXXXXXXXXX

Answered By – Alien

Answer Checked By – Katrina (BugsFixing Volunteer)

Leave a Reply

Your email address will not be published.