ERROR 1366 (22007): Incorrect string value: '\xAB\xB8\xA3\xCBA/...'
Hi,
I am trying to encrypt data in mariadb table but it is giving me error. Please find the details below and help me to get it resolved.
Table Info:
+-------+--------------+------+-----+---------+-------+
Field | Type | Null | Key | Default | Extra |
+-------+--------------+------+-----+---------+-------+
data | varchar(250) | YES | NULL |
+-------+--------------+------+-----+---------+-------+
Error while inserting Data:
MariaDB [mydb]> insert INTO test (data) VALUES (aes_encrypt('mydata','key123456')) -> ; ERROR 1366 (22007): Incorrect string value: '\xAB\xB8\xA3\xCBA/...' for column `mydb`.`test`.`data` at row 1 MariaDB [mydb]>
MariaDB Version mariadb Ver 15.1 Distrib 10.5.15-MariaDB, for debian-linux-gnu (aarch64) using EditLine wrapper
OS Details
Linux raspberrypi 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux