First, give the solution directly:
Click a_ I, do not enter the size, directly click to execute
Analysis
When you use phpMyAdmin to create a database table, we usually need to set a primary key and let it grow by itself. But sometimes when you finish setting, you may find such an error:
1089 - Incorrect prefix key; the used key part isn’t a string, the
used length is longer than the key part, or the storage engine doesn’t
support unique prefix keys
The picture is shown as follows:
Fault analysis:
References
Preview SQL statement:
We found that there is indeed an additional 4 in primary key, so how to solve the problem
do you really need the command line to handle it?Of course not
Solution:
When setting self growth, we will see this interface:
Tips:
it is worth noting that this size is not a required value, but it is not very familiar with phpMyAdmin. It is easy to subconsciously set a value for the first time. Once it is set, the above error will appear
so the final solution is the size in the diagram. Here, we just need to leave the blank and click execute to save the table successfully
Similar Posts:
- [Solved] MySQL ERROR 1062 (23000): Duplicate entry ‘0’ for key ‘PRIMARY’
- The solution of the table is full in MySQL
- The database returned no natively generated identity value [How to Solve]
- [Solved] Cause: java.sql.SQLException: Field ‘id‘ doesn‘t have a default value
- [Solved] MySQL uses the workbench tool, and the table status is read only
- mysql: [Err] 1075 – Incorrect table definition; there can be only one auto column and it must be d…
- Prepared statement needs to be re prepared
- [Solved] Django database Modify Warning: Did you rename house.houseid to house.id (a BigAutoField)? [y/N] n
- MySQL Error: [Err] 1071 – Specified key was too long; max key length is 767 bytes
- MySQL Error Number 1005 Can’t create table (Errno:150)