SQL Error During Database Rebuild: Reserved Word "lead" in MariaDB

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • doingenia
    Junior Member
    • Oct 2025
    • 2

    #1

    SQL Error During Database Rebuild: Reserved Word "lead" in MariaDB

    Hello everyone,

    I’m encountering an SQL error during the installation/database rebuild of EspoCRM on my Infomaniak hosting (MariaDB). Here’s the full error message:


    [2025-10-19 20:47:55] ALERT: Rebuild database error: An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1064 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 'lead (id VARCHAR(17) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_...' at line 1


    Is there an official solution to work around this issue with recent versions of MariaDB?
  • yuri
    EspoCRM product developer
    • Mar 2014
    • 9488

    #2
    Hi,

    The 'lead' is not reserved according the official MariaDB docs https://mariadb.com/docs/server/refe...reserved-words. Maybe it's some configuration in your particular environment. The list of reserved words to escape is defined by the doctrine/dbal library, here: vendor/doctrine/dbal/src/Platforms/Keywords/MariaDBKeywords.php.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • doingenia
      Junior Member
      • Oct 2025
      • 2

      #3
      Hi Yuri,

      Thank you for your quick response and the useful information. I really appreciate your help.

      Unfortunately, I don’t have much flexibility to intervene directly on the database since I’m using Infomaniak’s shared hosting.

      I also tried installing EspoCRM on another hosting provider, and the installation fails at the exact same point with the same error message. This makes me think that the issue might not be specific to my hosting environment, but rather something related to the EspoCRM installation process or its compatibility with certain MariaDB configurations.

      I’m a bit stuck at this point and not sure how to proceed. Any additional advice or guidance would be greatly appreciated.

      Thank you again for your time and assistance.

      Comment

      • yuri
        EspoCRM product developer
        • Mar 2014
        • 9488

        #4
        It's weird. 'LEAD' is reserved word in MySQL, but not reserved in MariaDB. I'll try to patch to add the 'LEAD' as reserved word and then release a new Espo version.
        If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

        Comment

        Working...