jorgeacetozi / ebook-chat-app-spring-websocket-cassandra-redis-rabbitmq

Pro Java Clustering and Scalability: Building Real-Time Apps with Spring, Cassandra, Redis, WebSocket and RabbitMQ
http://www.apress.com/us/book/9781484229842
293 stars 151 forks source link

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

Closed vseveryn closed 4 years ago

vseveryn commented 4 years ago

win10

docker-compose -f docker-compose/dependencies.yml up -d
Creating network "docker-compose_default" with the default driver
Creating docker-compose_rabbitmq-stomp_1 ... done
Creating docker-compose_cassandra_1 ... done Creating docker-compose_redis_1 ... done Creating docker-compose_mysql_1 ... done

java -jar ebook-chat-1.0.0.jar java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

mysql_error.txt

jorgeacetozi commented 4 years ago

Hi, sorry for the late response. Are you still having this issue?

vseveryn commented 4 years ago

I think yes, but I didn’t use it after I submitted an issue

jorgeacetozi commented 4 years ago

I see. From the exception, the application started in dev profile (which tries to establish a connection to MySQL using username root and password root) and the access was denied for these credentials. So, in theory, the only possibility is that the problem is in the MySQL container. I would advice you to debug the container by trying to connect to MySQL using a MySQL client, for example. I've tested it here on Mac and Linux and it's working fine. You could also try to set up a Linux VM to see if this also happens there.

vseveryn commented 4 years ago

so far I managed to run it on my mac. windows is still to be investigated.

PS jar url in readme should be updated to https://github.com/jorgeacetozi/ebook-chat-app-spring-websocket-cassandra-redis-rabbitmq/releases/download/ebook-chat-1.0.0/ebook-chat-1.0.0.jar

vseveryn commented 4 years ago

I resolved my issue. The problem was in other mysql process running as windows service. Docker messages didn't show anything about such conflict.