title: Can't connect to the socket for mysql running under docker from the host?
body: <p>I have mySQL running in a container. It and my app (in a different Docker container) seem to run fine. I am now trying to use Jaspersoft's iReport to develop a report with. I have managed to get iReport up and running on the host, Ubuntu. The problem is accessing the database from the host. </p>
  
  <p>This is required to use iReport and I just can't seem to get the connection working. I tried looking at the mysql socket, but it is not in the normal place, since mySQL is in a Docker Container. I am also working on getting JasperReports server to run in another container. But my problem is connecting from the host to the mySQL database running in Docker via an JDBC connection. </p>
  
  <p>here is the docker-compose.yml
  <a href="https://drive.google.com/open?id=1CY_tPmnot3zSab0BtLE1fJUC7sdD2tyA" rel="nofollow noreferrer">https://drive.google.com/open?id=1CY_tPmnot3zSab0BtLE1fJUC7sdD2tyA</a></p>
  
  <p>The connection that iReports has chosen is jdbc:mysql://localhost/substantiator. When I try to "test" this with the iReport database test button I get a popup that asks for password. I have tried using the same user/password combo that works from my app. It fails with: SQL problems: Communication Link Failure. In researching this I am asked to update the mySQL socket path in a mysql cnf file. But in my installation the socket file doesn't exist (because it it in docker?). So I am stumped. I am considering moving over to mariaDB. Any ideas? </p>