The code is as follows:
Errors are reported as follows:
First, why does this error occur:
The analysis is as follows:
With the popularity of smartphones, we begun to often use emoticons to help us communicate better. However, the utf8 encoding of MySQL only supports 3 bytes of data, while the expression data of the mobile terminal is 4 bytes of characters, so utf8mb4 appears (its minimum MySQL version supports version 5.5.3 +, while mine is 5.1, so an error is caused)
Problem-solving:
Uninstall MySQL version 5.1 and install the new version
Here is an installation blog: CentOS installation mysql8.0
After installation, run the program again,
The program runs normally
Similar Posts:
- MySQL installation error — failed to find valid data directory
- Unknown file system type ‘NTFS’ on NTFS U disk mounted by CentOS
- Raspberry Pi3 Error: “Unable to determine hardware version. I see: Hardware : BCM2835”
- How to Solve docker run Error: oci runtime error
- Docker Run Mysql Container Error: [ERROR] InnoDB: redo log file ‘./ib_logfile0’ exists
- Centos7.4 appears Yum command not found [How to Solve]
- This system is not registered with an entitlement server. You can use subscription-manager to reg…
- The solution to the error code is 2203 during MySQL installation
- error while loading shared libraries libaio.so.1
- MySQL 5.7 installation, mysql. Plugin ‘doesn’t exist error resolution