title: Why does Hibernate open many ports to MySQL database?
body: <p>I am working on a Spring Boot application with Vaadin and Hibernate, and I have a problem with hibernate MySQL, every time I query the database it open a new port to MySQL database.</p>
  
  <p>when I execute <code>netstat -ano | grep 3306</code> I get this : </p>
  
  <pre><code>  TCP    127.0.0.1:62066        127.0.0.1:3306         ESTABLISHED     10956
    TCP    127.0.0.1:62067        127.0.0.1:3306         ESTABLISHED     10956
    TCP    127.0.0.1:62068        127.0.0.1:3306         ESTABLISHED     10956
    TCP    127.0.0.1:62070        127.0.0.1:3306         ESTABLISHED     10956
    TCP    127.0.0.1:62071        127.0.0.1:3306         ESTABLISHED     10956
    TCP    127.0.0.1:62072        127.0.0.1:3306         ESTABLISHED     10956
    TCP    127.0.0.1:62073        127.0.0.1:3306         ESTABLISHED     10956
    TCP    127.0.0.1:62074        127.0.0.1:3306         ESTABLISHED     10956
    TCP    127.0.0.1:62075        127.0.0.1:3306         ESTABLISHED     10956
    TCP    127.0.0.1:62076        127.0.0.1:3306         ESTABLISHED     10956
    TCP    127.0.0.1:62077        127.0.0.1:3306         ESTABLISHED     10956
    TCP    127.0.0.1:62079        127.0.0.1:3306         ESTABLISHED     10956
    TCP    127.0.0.1:62080        127.0.0.1:3306         ESTABLISHED     10956
    TCP    127.0.0.1:62081        127.0.0.1:3306         ESTABLISHED     10956
    TCP    127.0.0.1:62082        127.0.0.1:3306         ESTABLISHED     10956
    TCP    127.0.0.1:62083        127.0.0.1:3306         ESTABLISHED     10956
    TCP    127.0.0.1:62084        127.0.0.1:3306         ESTABLISHED     10956
    TCP    127.0.0.1:62085        127.0.0.1:3306         ESTABLISHED     10956
    TCP    127.0.0.1:62086        127.0.0.1:3306         ESTABLISHED     10956
    TCP    127.0.0.1:62092        127.0.0.1:3306         ESTABLISHED     10956
    TCP    127.0.0.1:62093        127.0.0.1:3306         ESTABLISHED     10956
    TCP    127.0.0.1:62094        127.0.0.1:3306         ESTABLISHED     10956
    TCP    127.0.0.1:62095        127.0.0.1:3306         ESTABLISHED     10956
    TCP    127.0.0.1:62096        127.0.0.1:3306         ESTABLISHED     10956
    TCP    127.0.0.1:62097        127.0.0.1:3306         ESTABLISHED     10956
    TCP    127.0.0.1:62098        127.0.0.1:3306         ESTABLISHED     10956
    TCP    127.0.0.1:62099        127.0.0.1:3306         ESTABLISHED     10956
    TCP    127.0.0.1:62101        127.0.0.1:3306         ESTABLISHED     10956
    TCP    127.0.0.1:62102        127.0.0.1:3306         ESTABLISHED     10956 ....... 
  </code></pre>
  
  <p>What can I do to avoid this?</p>