Troubleshooting

SQLSTATE 2026 error when installing or updating PrestaShop

Reviewed on 3 min read mysql compatibilidad prestashop

The Doctrine warning about server_version is a wrapper. In this trace, the most specific detail is SQLSTATE[HY000] [2026]: the SSL connection to MySQL fails before Doctrine can query the server version.

[WARNING] Some commands could not be registered. An exception occurred in ConnectionFactory.php
while establishing a connection to figure out your platform version.
You can circumvent this by setting a 'server_version' configuration value.
For further information, visit: https://github.com/doctrine/DoctrineBundle/issues/673.
In AbstractMySQLDriver.php, an exception occurred in driver:
SQLSTATE[HY000] [2026] SSL connection error: SSL_CTX_set_default_verify_paths failed.
The same error is repeated in Exception.php and PDOConnection.php:
SQLSTATE[HY000] [2026] SSL connection error: SSL_CTX_set_default_verify_paths failed.

Do not change 1013 to 1016 in app/config/doctrine.yml: the official configuration uses 1013 for PDO::MYSQL_ATTR_MULTI_STATEMENTS, and that option does not fix the certificate paths that SSL_CTX_set_default_verify_paths failed points to.

Checks

  1. Confirm that the web installation and the process running the update use the same PHP version and the same pdo_mysql extension.
  2. Keep the full exception and check the PHP log for the same minute. Look for errors about OpenSSL, CA certificates or a certificate path that does not exist.
  3. If you manage the server, check the MySQL client's SSL configuration and the CA paths of the PHP that runs PrestaShop. Do not disable TLS verification to get the update working.
  4. On shared hosting, open a ticket with the domain, the approximate time, the PrestaShop and PHP versions and the full exception. Do not include passwords.

Setting server_version can avoid Doctrine's auto-detection when the connection already works, but it does not repair a connection that fails with SQLSTATE 2026. Switching between PDO implementations should only be tried if support confirms that it matches the PHP selector and the error observed on that server.

Before retrying an update, create a verified backup and follow the official PrestaShop update documentation.

Before running the installer again

Check whether the previous attempt got as far as modifying tables or files. A failed connection may be the first error, but an update interrupted at another stage could leave partial changes. Keep the log and go back to the intended consistent point before repeating an operation that writes data.

The terminal PHP and the domain PHP can use different configuration files and CA stores. Say which one ran the process; changing only the web selector does not prove that a console command uses the new configuration.

You may also find useful

Something wrong or out of date? Tell us and we will review it.