WordPress database error with latest WP – “WP_termmeta doesn't exist”

I’ve just upgraded to 4.7.2, and now I see this message:

WordPress database error: [Table 'myusername.wp_termmeta' doesn't exist]
SELECT term_id, meta_key, meta_value FROM wp_termmeta WHERE term_id IN    
(2,3,4,5,6,7,8,9,10,11,12,13,1,14,15) ORDER BY meta_id ASC

What’s the correct solution to this issue? I upgraded the database while upgrading. Lots of googling suggests strange things like upgrading to some beta releases, which I cannot do in production — that might be worse.

Welcome any pointers!

Solutions Collecting From Web of "WordPress database error with latest WP – “WP_termmeta doesn't exist”"

You are missing a table. You can add it using this sql

CREATE TABLE `wp_termmeta` (
`meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`term_id` bigint(20) unsigned NOT NULL DEFAULT '0',
`meta_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`meta_value` longtext COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (`meta_id`),
KEY `term_id` (`term_id`),
KEY `meta_key` (`meta_key`(191))
) ENGINE=InnoDB AUTO_INCREMENT=3255 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;