MySQL in Docker: Access denied for user `root@` (using password: YES)


I am trying to debug a problem where I cannot track down where the IP address is referenced. 

I have a MySQL 8.0 Docker container running on and no other Docker container and when I try to connect via DatagGrip I keep getting the error "Access denied for user `root@` (using password: YES)" even though I do not have a container at that IP (or at least `docker ps` does 

BTW, if I stop Docker for Desktop [Mac] I get "communications link failure" so it seems that somewhere there is something in Docker that response to IP  But even so, that's not my MySQL container.

I have tried to specify both and localhost in my datasource, and I have tried many different drivers and tried several StackOverflow answers, but it always comes back to "Access denied for user `root@` (using password: YES)"

So my main question is:

     "Why is DataGrip trying to talk to
     when I have not specified that?"

(I may have specified somewhere months ago, but if so I have no idea where now.)

Once that's resolved then my questions are:

1. What driver should I be using for MySQL in their official Docker container?
2. Is there any special configuration I need to provide for that driver? And
3. What should my data source config look like?

Thanks in advance.


Mike Schinkel,

How do you run your container? Could you provide a command?


vasily chernov — I don't use a command, at least not for this container. I run in from within the Docker Desktop GUI.


Make sure you've exposed a port for proper TCP/IP connection:


Please sign in to leave a comment.