title: Twitter Text from Java to MySQL: utf8mb4 SQL Error "reportcharsetnr("
body: <p>For context: Trying to load Twitter Text into a MySQL DB. Some Tweets have <code>utf8mb4</code> characters which throws a <em>java.SQL.Exception</em>. I solved this and thanks to <a href="https://stackoverflow.com/questions/13653712/java-sql-sqlexception-incorrect-string-value-xf0-x9f-x91-xbd-xf0-x9f">this post.</a></p>
  
  <p>Now, the Java code runs with no errors; however, I can't perform a simple <code>select * from test.tweet</code> on my table.</p>
  
  <p>I get the following SQL Error:</p>
  
  <blockquote>
    <p>Error Code: 0 45) . Please reportcharsetnr (  </p>
  </blockquote>
  
  <p><strong>SQL Code:</strong></p>
  
  <pre><code>create table test.tweet (
      text varchar(200) character set utf8mb4 collate utf8mb4_unicode_ci not null);
  </code></pre>
  
  <p><strong>Java Code:</strong> <em>(I know this works)</em></p>
  
  <pre><code>// create a mysql database connection
          String myDriver = "com.mysql.jdbc.Driver";
          String myUrl = "jdbc:mysql://localhost:3306/test?";
          Class.forName(myDriver).newInstance();
          Connection conn = DriverManager.getConnection(myUrl, "root", "pass");
          PreparedStatement setNames = conn.prepareStatement("SET NAMES 'utf8mb4'");
          setNames.execute();
  
  //Load the tweets into a mySQL DB
                      loadTweets(jsonObject, conn);
  </code></pre>
  
  <p>There is NOTHING on the internet about this error. Any thoughts why I can't query this error message:</p>
  
  <blockquote>
    <p><strong>Error Code: 0 45) . Please reportcharsetnr (</strong><br>
    <img src="https://i.stack.imgur.com/Klvtx.png" alt="MySQL error message"></p>
  </blockquote>