I have MySQL table with column and its properties:
name: message
datatype: varchar(300)
default/expression: utf8
I trying to insert new data in table that contain text in Cyrillic.
Here's my sql query:
INSERT INTO db.log (id, info_id, user_id, timestamp, operation, message)
VALUES ('792','575', '35','2016-12-20 12:09:45','add',
'[email protected] created new line ัะตัั ')
I got the exception:
1 row(s) affected, 1 warning(s): 1366 Incorrect string value: '\xD1\x82\xD0\xB5\xD1\x81...' for column 'message'
What can I do to resolve the exception?
Seems that the default character set for your database is likely Latin or other, thou it doesn't store Cyrillic.
Use ALTER DATABASE and ALTER TABLE commands to make sure of correct character set:
See more info on your issue here: How to convert an entire MySQL database characterset and collation to UTF-8?