Making the ssl Connection in Drupal

There are times when the connection to your Drupal DB will need to be via ssl, such as when using an external DB service like clearDB. How do you accomplish this with regards to the settings.php file?

Simple.

Add the following to your database array:

      'pdo' => array (

            PDO::MYSQL_ATTR_SSL_CERT => 'path-to-cert.pem',

            PDO::MYSQL_ATTR_SSL_KEY => 'path-to-key.pem',

            PDO::MYSQL_ATTR_SSL_CA => 'path-to-ca.pem',

                     ),

      ),

 

Add new comment

Markdown

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd>
  • Missing filter. All text is removed