mysql: set primary key and autoincrement By Ricardo MallaDecember 23, 2020April 4, 2021uncategorized ALTER TABLE XXXXXX ADD PRIMARY KEY (ID); ALTER TABLE XXXXXX MODIFY id int NOT NULL AUTO_INCREMENT; ALTER TABLE proxy_ips ADD UNIQUE (proxy); o select a DB: use DB_NAME;