title: Access remote MySQL server without editing my.conf
body: <p>I want to connect my Django app (hosted on a VPS) to a database hosted on another server with more memory, so I can run stuff and add things to the database without the risk of it getting killed for using too much memory on my VPS. The things I've seen about this (e.g., <a href="https://stackoverflow.com/questions/7130239/how-to-connect-to-mysql-server-on-another-host">How to connect to MySQL server on another host?</a>) all involve editing <code>my.cnf</code> and changing the <code>bind-address</code> line. I a)don't have root privileges to do this, and b)don't want to expose other users' MySQL dbs to potential security risks. I tried editing <code>~/.my.cnf</code> to change the <code>bind-address</code> thing, but that doesn't seem to work. </p>
  
  <p>I also found <a href="http://www.rackspace.com/knowledge_center/article/mysql-connect-to-your-database-remotely" rel="nofollow noreferrer">http://www.rackspace.com/knowledge_center/article/mysql-connect-to-your-database-remotely</a>, which suggests creating <code>'user'@'remote-ip-address'</code> and then <code>grant</code>ing that user permissions. I tried that, but I keep getting <code>ERROR 2003 (HY000): Can't connect to MySQL server on '(the server's address)' (110)</code> when I try <code>mysql -u username -p -h (the server's address)</code>.</p>
  
  <p>I have access to the <code>root</code> user for MySQL, but no other admin privileges on the server where I want to set up the database. Is there any way to configure things so Django can access this remote db without directly editing <code>/etc/mysql/my.cnf</code>?</p>