title: Minimal setup for MariaDB to handle Emojis
body: <p>I followed <a href="https://stackoverflow.com/a/35189650/4534">https://stackoverflow.com/a/35189650/4534</a> but still I get <code>Error 1366: Incorrect string value</code>, when posting an emoji into "name": </p>
  
  <pre><code>INSERT INTO `users` (`name`) VALUES ('Foo bar ');
  </code></pre>
  
  <p>SQL setup is:</p>
  
  <pre><code>SET NAMES utf8mb4;
  CREATE DATABASE rest_api_example;
  USE rest_api_example;
  CREATE TABLE users (
      id INT AUTO_INCREMENT PRIMARY KEY,
      name VARCHAR(50) NOT NULL,
      age INT NOT NULL
  );
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/Rw57Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Rw57Y.png" alt="Database configuration"></a></p>
  
  <p>I use the <strong>mariadb</strong> image to test the above sql via <a href="https://github.com/kaihendry/GoApiTutorial/blob/master/docker-compose.yml" rel="nofollow noreferrer">https://github.com/kaihendry/GoApiTutorial/blob/master/docker-compose.yml</a></p>