After query, I know that the MySQL field is too long, so I just changed the length of the two fields.
When an index is created, the length of the key calculated by the database is to accumulate the char length of all the fields used by the index, and then multiply by the following proportion, the length of the key cannot exceed 1000:
Latin1 = 1 byte = 1 Character
Uft8 = 3 byte = 1 Character
GBK = 2 byte = 1 Character
For example, you can see more clearly. Take GBK as an example:
Create unique index 'unique _ record' on reports ('report _ name', 'Report _ client', 'Report _ City ');
Report_name varchar (200), report_client varchar (200), report_city varchar (200)
(200 + 200 + 200) * 2 = 1200> 1000. If the report_city is changed to varchar (1071), the index can be created successfully.
If the table is a utf8 character set, the index cannot be created.