Answer the question
In order to leave comments, you need to log in
How to remove ERROR 1366 (HY000): Incorrect string value: '\xF4\xA9"\xDA\xA7\x0D...'?
My database has a table:
CREATE TABLE `customer` (
`customer_id` INT AUTO_INCREMENT,
`first_name` varchar(40) NOT NULL,
`last_name` varchar(40) NOT NULL,
`phone` varchar(30),
`email` varchar(50),
`street` varchar(50),
`city` varchar(50) DEFAULT "Lviv",
`state` varchar(50),
`zip_code` varchar(50),
`login` varchar(150) NOT NULL ,
`password` varchar(255),
PRIMARY KEY (`customer_id`)
);
I needed to make a trigger that encodes a password:
CREATE TRIGGER customer_password BEFORE
INSERT ON customer FOR EACH ROW
SET NEW.password = AES_ENCRYPT(NEW.password, 'test');
And when I try to insert an item into the table:
INSERT INTO customer VALUES (NULL, 'Petroror', 'Petro', NULL, '[email protected]', 'Zelena', 'Lviv', NULL, NULL, 'petros', 'mypass');
I get this error:
ERROR 1366 (HY000): Incorrect string value: '\xF4\xA9"\xDA\xA7\x0D...' for column 'password' at row 1
utfmb4 tried..
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question