If you’re getting an error that reads something like “Multiple primary key defined” in MySQL, it’s probably because you’re defining more than one primary key to a table.
A table can only have one primary key in MySQL.
It’s possible that you were trying to create a composite primary key (i.e. a primary key consisting of multiple columns), in which case, you can fix the issue with a simple modification to your code.
Otherwise, you will need to decide which column should be the primary key for the table and only apply the PRIMARY KEY
definition to that column.