Issue
When connecting my Liferay server to MariaDB 10.6, I get the following error when creating a widget page:
(conn=143451) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'body, lastPublishDate, calendarNotificationTemplateId) values (?, ?, ?, ?, ?,...' at line 1
Environment
- Liferay Quarterly Releases
- MariaDB 10.3+ with Oracle mode enabled
Cause
Starting with MariaDB 10.3, the SQL syntax error occurs because body is a reserved word when operating in Oracle_Mode.
Resolution
To resolve this, you must disable Oracle_Mode by removing the ORACLE flag from your MariaDB configuration.