title: Encrypting MySQL Traffic In Scripts
body: <p>I need to be able to encrypt the MySQL traffic from a web server to a database server.  I know how to set MySQL to use SSL based on the server and client settings in my.cnf however, this needs to be done using mysql_connect() in PHP.  This may be a 2 part question.</p>
  
  <p>1) Does mysql_connect() use the MySQL client settings that are set in my.cnf?</p>
  
  <p>If not...</p>
  
  <p>I have read that you can use MYSQL_CLIENT_SSL however, where is the SSL data obtained from?  Does using MYSQL_CLIENT_SSL in the mysql_connect function automagically encrypt the traffic?</p>
  
  <p>Simply put, what is the best way to do this?</p>
  
  <p>Thanks!</p>