当前位置:网站首页>The SQL file of mysql8.0 was imported into version 5.5. There was a pit
The SQL file of mysql8.0 was imported into version 5.5. There was a pit
2022-06-13 05:50:00 【sjgeng111】
first : Character encoding problem
error :
Unknown collation: ‘utf8mb4_0900_ai_ci‘......
resolvent :
Manually modify sql file :
utf8mb4_0900_ai_ci Replace all with utf8_general_ci
utf8mb4 Replace with utf8
the second :TIMESTAMP Type problem
error :
Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT
The reason is when you give a timestamp Set to on updatecurrent_timestamp When , Other timestamp Fields need to be explicitly set default value . But if you have two timestamp Field , Set only the first to current_timestamp And the second one doesn't have a default , You're going to report a mistake
resolvent :
Set default values for several other fields :
DEFAULT '0000-00-00 00:00:00'
Third : Character length problem :
error :
Specified key was too long; max key length is 767 bytes
resolvent :
stay utf-8 Character set ,255 success ,utf-8 One character takes up 3 Bytes ,255*3=765 mysql5.6 The longest index is 767.
边栏推荐
- 10 signalstartevent and signalcatchingevent of flowable signal events
- Leetcode Timo attack - simple
- Leetcode Hamming distance simple
- MongoDB 多字段聚合Group by
- Calculate the number of days between two times (supports cross month and cross year)
- C calls the API and parses the returned JSON string
- Randomly fetch data from the list
- Leetcode judge subsequence simple
- The problem of distinguishing and sharing sessions for multiple applications in tongweb
- Solve the problem of garbled code in the MySQL execution SQL script database in docker (no need to rebuild the container)
猜你喜欢

Nacos series registry principle and source code analysis

Config server configuration center of Nacos series

890. Find and Replace Pattern

Tongweb card, tongweb card, tongweb card

Sentinel series introduction to service flow restriction

OpenGL Mosaic (8)

Misunderstanding of tongweb due to ease of use

Function and application scenario of field setaccessible() method

How MySQL optimizes the use of joint index ABC

Django uploads local binaries to the database filefield field
随机推荐
Tongweb crawl performance log script
Unity game optimization (version 2) learning record 7
Getclassloader() returns null, getclassloader() gets null
Config server configuration center of Nacos series
Concurrent programming -- source code analysis of thread pool
Agile conflicts and benefits
Feel the power of shardingsphere JDBC through the demo
Django uploads local binaries to the database filefield field
Leetcode- number of maximum consecutive ones - simple
【自动化测试】Cypress手册
Compilation croisée helloworld avec cmake
Browser screenshot method (long screenshot, node screenshot, designated area screenshot)
软件测试——接口常见问题汇总
MySQL fuzzy query and sorting by matching degree
No assessment summary
Parallelgateway and exclusivegateway of 14 gateways
What happens when the MySQL union index ABC encounters a "comparison operator"?
Concurrent programming -- what is threading?
About the solution of pychart that cannot be opened by double clicking
Tongweb customs clearance guidelines