Answers.Body: <p><strong>Update:</strong></p>
  
  <p>As of the next Craft 2.6 release (<a href="https://craftcms.com/changelog#build2945" rel="nofollow">post 2.6.2945</a>), Craft has exposed an <code>attributes</code> database config setting that you can pass arbitrary <a href="https://secure.php.net/manual/en/pdo.setattribute.php" rel="nofollow">PDO attribute</a> <code>key =&gt; value</code> pairs into.</p>
  
  <p>So, assuming your MySQL box is setup <a href="https://dev.mysql.com/doc/refman/5.5/en/using-secure-connections.html" rel="nofollow">properly to use SSL</a> and assuming the database user that Craft is using to connect to the box can connect over SSL, then you can do something like this to enable Craft to talk to MySQL over SSL:</p>
  
  <pre><code>'attributes' =&gt; array(
       PDO::MYSQL_ATTR_SSL_KEY    =&gt; '/path/to/my/client-key.pem',
       PDO::MYSQL_ATTR_SSL_CERT   =&gt; '/path/to/my/client-cert.pem',
       PDO::MYSQL_ATTR_SSL_CA     =&gt; '/path/to/my/ca-cert.pem',
   ),
  </code></pre>
  
  <hr>
  
  <p><strong>Original</strong>:</p>
  
  <p>In Craft 2.x, this isn't currently possible.  Craft 3, however, will expose the necessary client side configs so that if your MySQL box has an SSL cert installed and supports SSL, then you can configure Craft to connect via SSL.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-16T06:14:23.447Z
Answers.Text: Thanks Brad. Do you have a link that documents the setup? I've looked on the craft website but can't find anything.
Answers.UserDisplayName: Gerhard
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-16T07:26:28.253Z
Answers.Text: Craft 3 isn't even in beta, there's no documentation yet.
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-16T00:48:08.897Z
Answers.LastActivityDate: 2016-09-30T22:53:57.627Z
Answers.LastEditDate: 2016-09-30T22:53:57.627Z
Answers.UserDisplayName: Brad Bell
Body: <p>Does Craft CMS support MySQL over SSL?</p>
  
  <p>Thanks!</p>
  
Tags: <mysql><ssl>
Title: Does Craft CMS support MySQL over SSL?
ThreadText: # Does Craft CMS support MySQL over SSL?
  
  (Asked by: username_0 on 2016-03-15)
  
  Does Craft CMS support MySQL over SSL?
  
  Thanks!
  
  **Tags:** mysql, ssl
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-03-16. Score: 5 | Accepted answer
  
  **Update:**
  
  As of the next Craft 2.6 release ([post 2.6.2945](https://craftcms.com/changelog#build2945)), Craft has exposed an `attributes` database config setting that you can pass arbitrary [PDO attribute](https://secure.php.net/manual/en/pdo.setattribute.php) `key => value` pairs into.
  
  So, assuming your MySQL box is setup [properly to use SSL](https://dev.mysql.com/doc/refman/5.5/en/using-secure-connections.html) and assuming the database user that Craft is using to connect to the box can connect over SSL, then you can do something like this to enable Craft to talk to MySQL over SSL:
  
  ```
  'attributes' => array(
       PDO::MYSQL_ATTR_SSL_KEY    => '/path/to/my/client-key.pem',
       PDO::MYSQL_ATTR_SSL_CERT   => '/path/to/my/client-cert.pem',
       PDO::MYSQL_ATTR_SSL_CA     => '/path/to/my/ca-cert.pem',
   ),
  
  ```
  
  ---
  
  **Original**:
  
  In Craft 2.x, this isn't currently possible. Craft 3, however, will expose the necessary client side configs so that if your MySQL box has an SSL cert installed and supports SSL, then you can configure Craft to connect via SSL.
  
  > **Comments:**
  > **username_0**: Thanks username_1. Do you have a link that documents the setup? I've looked on the craft website but can't find anything.  
  > **username_2**: Craft 3 isn't even in beta, there's no documentation yet.  
  
  ---
  
  