title: Spring Boot JPA set mysql charset to utf-8
body: <p>I'm trying to set my tables Character Set to UTF-8 instead of latin1. I was trying to do it by adding:</p>
  
  <pre><code>spring.jpa.properties.hibernate.connection.CharSet=UTF-8
  spring.jpa.properties.hibernate.connection.characterEncoding=UTF-8
  spring.jpa.properties.hibernate.connection.useUnicode=true
  </code></pre>
  
  <p>to the application.properties file. I also tried to do it through the connection URL by adding:</p>
  
  <pre><code>&amp;useUnicode=true&amp;connectionCollation=utf8_general_ci&amp;characterSetResults=utf8
  </code></pre>
  
  <p>to the end of the URL.
  None of them worked. I am using spring boot version 2.0.1.RELEASE and hibernate.</p>