index-wp-mysql-for-speed
index-wp-mysql-for-speed copied to clipboard
Strange index names cause syntax errors.
MKhalid reports:
My wp_options table is present both in revert key and convert key, and when i try to either convert or revert using the plugin page or wp-cli i get the following error,
“You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘UNIQUE, DROP KEY INDEX”
So I did a –dry-run and found the Query and Put it on my workbench still the same error.
ALTER TABLE wp_options ADD UNIQUE KEY option_name (option_name), DROP KEY option_id, DROP KEY UNIQUE, DROP KEY INDEX;
the error goes if i remove “DROP KEY UNIQUE, DROP KEY INDEX” from the query. So I manually dropped the two indexes “UNIQUE” and “INDEX” using mysql workbench and run the cli command for enabled and it worked successfully.
https://wordpress.org/support/topic/options-table-both-revert-and-convert-and-syntax-error/