Incorrect string value: ' \xe6\x9b\xb9\xe5\x86\xac ... ' for column ' Realname ' at row 1
This situation is typically caused by a coding error at the time of the database design.
Show variables like ' character% ' to view the database encoding for latin1.
If the data is not important when the project is being tested, the solution is to change the encoding format of the database using the alert database tuanplus character set UTF8 , and then re -build the table.
Note: In hibernate, specify hibernate.hbm2ddl.auto=create, redeploy the project, and hibernate will automatically re-build the table.
If the data in the project is important data, use the ALTER TABLE address convert to character set UTF8 convert the data table encoding for the Chinese character to UTF8 (the data table in this example is address):
To avoid improper operation, it is best to back up the data first.
Backup is a good habit, isn't it, *~*?
Memento.
Inserting the Chinese times to MySQL wrong incorrect string value: ' \xe6\x9b\xb9\xe5\x86\xac ... ' for col ....