How do I troubleshoot MySQL compatibility issues with WordPress?
If you are experiencing compatibility issues between MySQL and WordPress or any of its plug-ins, it may be due to your database’s default configuration.
MySQL databases have a configuration variable named sql_mode, which features a wide array of settings that can be individually adjusted. These settings are detailed in the official sql_mode documentation.
Two of these settings in particular often create compatibility issues with WordPress and its plug-ins:
ansi_quotes(boolean): Determines how double-quotes (“”) are handled. When set toTrue(default), you can use double-quotes to wrap string partials. When set toFalse, you can use double-quotes as identifier quote characters, like backticks.sql_require_primary_key(boolean): Determines whether primary keys are a requirement. When set toTrue(default), primary keys are required. When set toFalse, primary keys are optional.
To troubleshoot these issues, first try setting ansi_quotes to False by following How to Set Global SQL Mode on MySQL Clusters.
Then, if your cluster only has one node, you can also try setting sql_require_primary_key to False. However, we do not currently support adjusting this mode in the control panel. Instead, you can set this mode by making a configuration request via our API.