title: Using mysql_real_escape_string with PDO (no connection to localhost server)
body: <p>So I'm fairly paranoid and use <code>mysql_real_escape_string()</code> with PDO. I actually don't use prepared statements in PDO, so I do have to sanitize the inputs.</p>
  
  <p>When hosting on my own server, I'd create an unprivileged user on the local machine so <code>mysql_real_escape_string()</code> wouldn't fail and empty my variable (heh, now <i>that's</i> sanitization!). I realize this is a pretty fail solution, since if the db's don't have matching charsets, then there's no point to the sanitizing at all, but it worked for the interim.</p>
  
  <p>Now at my new host, I can't create an unpassworded, unprivileged user for the database... and <code>mysql_real_escape_string()</code> fails because there is no mysql server on the local machine. I can't edit php.ini to set the hostname/user/pass for the default database.</p>
  
  <p>What can I do?</p>
  
  <p>Brainstorming as I am writing this, I am wondering if php allows runtime changes to the config... maybe... hrm.
  <strong>Edit</strong>: Hm... <code>ini_set()</code>? :O</p>