Use the following SQL statement, put more than one column name in the brackets if you want more than one column as the primary key.
ALTER IGNORE TABLE ADD PRIMARY KEY ()
How to add a primary key index to a table and ignore and remove duplicates
Use the following SQL statement, put more than one column name in the brackets if you want more than one column as the primary key.
ALTER IGNORE TABLE ADD PRIMARY KEY ()