1067 – invalid default value for ‘sex’
the above error occurred when using SQL statement to create a table in Navicat,
cause: the character set code of the default table is Latin1, so it’s OK to insert numbers, Insert Chinese characters will report an error
solution: alter database database name/table name character set utf8
1366 – incorrect string value: ‘Xe6/x8a/X80/Xe6/x9c/XAF…’ for column ‘depname’ at row 1
reason: the above consistency
problem is that the character set code of the database has been changed before, why the same problem will appear
check the database and I want to The character set code of the inserted table is UTF-8, but the table is not
alter table dep character set utf8
Still report the same error
check the field code
the character code of the field is Latin_ 1
helpless 😔
change the fields
ALTER TABLE dep CHANGE depname depname
VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci;
Finally, it has become
but it’s very troublesome to change it all the time. It’s better to change the configuration file of MySQL once and for all
Read More:
- RuntimeError: Expected hidden[0] size (x, x, x), got(x, x, x)
- [Solved] emulator: glteximage2d: got err pre 🙁 0x502 internal 0x1908 format 0x1908 type 0x1401
- CLP: error: getaddrinfo enotfound http://x.x.x.x/
- [-] handler failed to bind to x.x.x.x: Port troubleshooting
- A problem occurred configuring project ‘:x x x‘. > java.lang.NullPointerException (no error message)
- Apache Groovy——java.lang.NoSuchMethodError: x.x.x: method <init>()V not found
- module ‘win32com.gen_py.00020813-0000-0000-C000-000000000046x0x1x9‘ has no attribute ‘CLSIDToClassMa
- JSON parse e rror: Invalid UTF-8 middle byte 0x3f;
- Could not write JSON: write javaBean error, fastjson version x.x.x, class
- java.sql.SQLException: Incorrect string value:
- OSD deployment failure code (0x00000001) 0x80004005
- Microsoft OLE DB Provider for SQL Server error & #x27;80040e4d & #x27;
- 【PTA:】 Error: class X is public should be declared in a file named X.java
- Install. Net Framework 3.5 error 0x800f0950 in Windows 10
- Unhandled exception at 0x00000000: 0xc0000005: access violation at position 0x0000000000
- Elasticsearch6. X invalid time range query bug
- Stm32f107 kernel file — stm32f10x. H
- ERROR: invalid byte sequence for encoding “UTF8”: 0x00
- Solve the ‘UTF-8’ codec can’t decode byte 0xe9 in position 3114: invalid continuation byte error
- Ubuntu18.04 x11vnc failed, report error opening logfile: /var/log/x11vnc.log