Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12201

Problems connecting to a MariaDB server: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

$
0
0

I am trying to connect a Spring Boot Application to my MariaDB server which is up and running. I am getting the following error:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource ...Caused by: liquibase.exception.DatabaseException: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

Now I've seen that similar questions have been asked on Stackoverflow before, and I tried the most common approaches, like granting all privileges:

GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY '%password%' WITH GRANT OPTION;

And removing the password for the root user:

SET PASSWORD FOR root@localhost=PASSWORD('');

None of these approaches worked so far. I cannot really change the .properties file, but from what I can see a password is generated, encrypted and stored every time the application runs:

connection.driver_class = com.mysql.jdbc.Driverconnection.url = jdbc:mysql://127.0.0.1:3306/local02?useSSL=trueconnection.username = rootconnection.password = ../../config/local/dbkey.txtconnection.pool_size = 200

It's important to highlight that I am experiencing this problem just on MacOS, on Windows (same files, same DB, same IDE) doesn't arise.

Is there anything else I can try?


Viewing all articles
Browse latest Browse all 12201

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>