I used Duplicator Pro to move my live site to a virtual host on WampServer on my Windows 11 Pro desktop. Everything works fine except for two recurring errors in the PHP_Error.log file:
[19-Feb-2023 16:15:21 UTC] WordPress database error Table ‘_prefix_e_events’ already exists for query CREATE TABLE _PREFIX_e_events ...
and
[19-Feb-2023 16:15:21 UTC] WordPress database error Duplicate key name ‘created_at_index’ for query ALTER TABLE _PREFIX_e_events ADD INDEX created_at_index (created_at) ...
Note that I changed the real prefix to "prefix".
I understand the error is caused by mixed case PREFIX/prefix in the commands. I added "lower_case_table_names = 2" to my.ini file, but then WampServer won't start with this error:
2023-02-22T15:59:25.510378Z 1 [ERROR] [MY-011087] [Server] Different lower_case_table_names settings for server ('2') and data dictionary ('1').
I believe I need to re-initialize the server but I don't know how to do that. This post gives clear instructions how to do this in Linux.
Is re-initializing the server the correct solution? If so, does anyone know how to do this on Windows 11 with WampServer 3.3.1? If not, what are my next steps?
Other things I have tried, with no luck:
Installed the latest release of MySQL 8.0.32, edited my.ini file to add lower_case_table_names = 2, then launched WampServer and switched to the new version of MySQL. This generated the same error with mismatched server/data dictionary.
Launched phpMyAdmin and tried to change the lower_case_table_names setting from 1 to 2, but got an error that this variable is read only.
Changed the prefix to lower case in wp-config.php. This eliminated the errors but only worked until I logged out. I was unable to login had to restore the prefix to uppercase in wp-config.php and then logged back into WordPress and have the site function again.