This fix is for issues where you’re unable to make changes to specific tables of your WordPress database (the same logic can be applied to other scripts as well).
Basically, you do not see the following options while viewing your database tables through phpMyAdmin:
This issue occurs due to missing PRIMARY and UNIQUE key’s in the database tables. If you have access to phpMyAdmin, fixing this issue is fairly simple.
Before we start, we’ll take a backup of the database, just to be on the safer side. You can refer this article to know more abut exporting your database through phpMyAdmin.
Now that we have a backup of the existing database, We’ll proceed with repairing our WordPress database. Please follow these steps:
PRIMARY key : option_id UNIQUE key : option_name
We’ll need to make sure we assign both the keys respectively.
You can also run this SQL query if you’re having trouble updating the options in the steps mentioned above.
ALTER TABLE `wp_options` ADD PRIMARY KEY(`option_id`);
ALTER TABLE `wp_options` ADD UNIQUE( `option_name`);
This Official documentation by WordPress.org has information on the database structure, KEY structure for each table and much more: Database Description