title: Unable to obtain Jdbc connection from DataSource - Flyway
body: <p>I have a MariaDB database running as a docker container the database is available on: <code>127.0.0.1:3306</code> and no application has any problems connecting to the database with the given credentials.  </p>
  
  <p>MySQL Workbench (no issues), DataGrip (no issues), Artisan (no issues), IDEA IDE Database view (no issues), manual connection (no issues). No issues at all the service is available at localhost on default port and all other applications can connect to them with no problem. </p>
  
  <p>However <code>flyway</code> will throw:  </p>
  
  <pre><code>Flyway 4.1.1 by Boxfuse
  
  ERROR:
  Unable to obtain Jdbc connection from DataSource (jdbc:mysql://127.0.0.1:3306/local_db_emp) for user 'local_user_emp': Could not connect to 127.0.0.1:3306: unexpected end of stream, read 0 bytes from 4
  ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  SQL State  : 08
  Error Code : -1
  Message    : Could not connect to 127.0.0.1:3306: unexpected end of stream, read 0 bytes from 4
  </code></pre>
  
  <p>This is how I'm running the <code>flyway</code> command:  </p>
  
  <pre><code>flyway \
      -driver=org.mariadb.jdbc.Driver \
      -url=jdbc:mariadb://127.0.0.1:3306/local_db_emp \
      -user=local_user_emp \
      -password=local_pass_emp \
      -locations=filesystem:/src/main/resources/migrations \
      -sqlMigrationPrefix= \
      migrate
  </code></pre>
  
  <p>I have also tried:<br>
  - using <code>localhost</code> instead of <code>127.0.0.1</code><br>
  - using <code>jdbc:mysql</code><br>
  - using MySQL driver<br>
  - tried using docker container name <code>dev_database</code> instead of <code>127.0.0.1 || localhost</code>  </p>
  
  <p>Pinged the service and no issues available everywhere just not with `flywayz.</p>