I've set the column type to utf8mb4 and the collation to utf8mb4_bin. The table defaults are also utf8mb4 and utf8mb4_bin.
When I use SequelPro to add the emoji "🤖" to the database manually, it works just fine.
However, when I do an INSERT using JDBC, it gives me the Incorrect String Value error.
Here is my connection string: jdbc:mysql://localhost:3306/myschema
I'm using mysql-connector-java-5.1.32-bin.jar
What am I doing wrong?
Here is some of the code I'm using:
String sql = "INSERT INTO table VALUES (?)"
String body = ...;
statement = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);
statement.setString(1, body)
statement.execute();
?useUnicode=yes&characterEncoding=UTF-8