title: java replace ' with \'
body: <p>I'm working with mySQL. It can not handle if <code>'</code> is in the String that is being added to the database.</p>
  
  <p>I tried:</p>
  
  <pre><code>replaceAll("'","\\'") 
  </code></pre>
  
  <p>and </p>
  
  <pre><code>replaceAll("'","\'")
  </code></pre>
  
  <p>Any ideas how I would go about replacing <code>'</code> with <code>\'</code>?</p>