# How to provide ssl certificate for database connection

**URL:** <https://forum.mautic.org/t/how-to-provide-ssl-certificate-for-database-connection/19260>\
**Category:** Product Support\
**Created:** [April 29, 2021, 6:21am UTC](https://forum.mautic.org/t/how-to-provide-ssl-certificate-for-database-connection/19260 "2021-04-29T06:21:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aakash](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/aakash/32/608_2.png) [@aakash](https://forum.mautic.org/u/aakash)\
**Post date:** [April 29, 2021, 6:21am UTC](https://forum.mautic.org/t/how-to-provide-ssl-certificate-for-database-connection/19260/1 "2021-04-29T06:21:28Z")

</div>

**Your software**  
My Mautic version is: 3.3.2  
My PHP version is: 7.3  
My Database type and version is: MySQL Server

**Your problem**  
My problem is: I am using azure database to be used with mautic. Mautic is giving me 500 error when I try to configure it. Looking at the logs, I assume that we need to provide ssl certificate for database connection, but there is no way to do so. Azure databases by default uses ssl connections and I don’t want to disable for security seasons.  
Ref Link: [Configure SSL - Azure Database for MySQL | Microsoft Docs](https://docs.microsoft.com/en-us/azure/mysql/howto-configure-ssl#sample-code)

Please let me know how to provide ssl certificate for configuring database.

These errors are showing in the log:  
[2021-04-27 11:15:10] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\DriverException: “An exception occurred in driver: SQLSTATE[HY000] [9002] SSL connection is required. Please specify SSL options and retry.” at /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 106 {“exception”:"[object] (Doctrine\DBAL\Exception\DriverException(code: 0): An exception occurred in driver: SQLSTATE[HY000] [9002] SSL connection is required. Please specify SSL options and retry. at /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:106, Doctrine\DBAL\Driver\PDOException(code: 9002): SQLSTATE[HY000] [9002] SSL connection is required. Please specify SSL options and retry. at /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:31, PDOException(code: 9002): SQLSTATE[HY000] [9002] SSL connection is required. Please specify SSL options and retry. at /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:27)"}

Steps I have tried to fix the problem: NA

---

<div class="post-metadata">

**Author:** ![somepad](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/somepad/32/6472_2.png) [@somepad](https://forum.mautic.org/u/somepad)\
**Post date:** [July 13, 2022, 2:10pm UTC](https://forum.mautic.org/t/how-to-provide-ssl-certificate-for-database-connection/19260/2 "2022-07-13T14:10:29Z")

</div>

We have the same requirements on mautic 4.4.0.  
Is there any solution for this?
