title: convert a json column to utf8mb4
body: <p>in a mysql insert request i used (<code>$text</code> being sent by <code>$_POST</code> and column <code>MESSAGE</code> being of JSON format) : </p>
  
  <pre><code>$data = '{"mytext":".'$text'."}';
  
  INSERT INTO xxxxx (MESSAGE) VALUES('$mytext');
  </code></pre>
  
  <p>i was stuck with the following problem :</p>
  
  <blockquote>
    <p>Some smiley are displaying ok, but some with a "?"</p>
  </blockquote>
  
  <p>I searched here for an answer and found that utf8mb4 must be set on the database, tables and columns.</p>
  
  <p><strong>The problem</strong> is when i try the following which contains my registered message:</p>
  
  <pre><code>ALTER TABLE xxxxx CHANGE column_name column_name JSON CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  </code></pre>
  
  <p><strong>Result of the above</strong> </p>
  
  <blockquote>
    <p>You have an error in your SQL syntax;</p>
  </blockquote>
  
  <p>I assume that it is only possible on <code>Varchar()</code> column.</p>
  
  <p>Do you have any idea on how i can make this work ?  </p>
  
  <p>Thank you</p>