Problem
It is not possible to create one or more tables.
Cause
Usually the prefix in wp-config.php of $table_prefix = 'XXX'; is too long, so MySQL/MariaDB limits are exceeded and tables cannot be created.
Solution
The prefix has to be changed and should not be longer than 3 to 5 characters. To do this, shorten the value of $table_prefix and then rename all tables in the database.
WordPress still refers to the old table prefix in some of the settings saved in your database. To complete the conversion, you must replace these entries with your new prefix.
In the following example, the table prefix is changed from $table_prefix = 'OLD'; to $table_prefix = 'NEW';.
UPDATE `NEW_usermeta` SET `meta_key` = 'NEW_capabilities' WHERE `meta_key` = 'OLD_capabilities';
UPDATE `NEW_usermeta` SET `meta_key` = 'NEW_user_level' WHERE `meta_key` = 'OLD_user_level';
UPDATE `NEW_usermeta` SET `meta_key` = 'NEW_autosave_draft_ids' WHERE `meta_key` = 'OLD_autosave_draft_ids';
UPDATE `NEW_options` SET `option_name` = 'NEW_user_roles' WHERE `option_name` = 'OLD_user_roles';