Why I can't connect the Azure MySQL database?

519 Views Asked by At

I have a problem connecting from eZPlatform 3.0 (based on Symfony 5) to the Azure MySQL database. I get the error:

SQLSTATE[HY000] [9002] SSL connection is required. Please specify SSL options and retry.

Configuration is as follows:

doctrine:
    dbal:
        # configure these for your database server
        driver: '%database_driver%'
        charset: '%database_charset%'
        default_table_options:
            charset: '%database_charset%'
            collate: '%database_collation%'
        url: '%env(resolve:DATABASE_URL)%'
        options:
            !php/const:PDO::MYSQL_ATTR_SSL_CA:  '%ca_cert%'
            !php/const:PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT : false

Strange thing is that this happens when I visit the route /admin, on homepage I don't get that exception.

0

There are 0 best solutions below