title: Which MySQL datatype to use for an IP address?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1108918/how-to-store-an-ip-in-mysql">How to store an IP in mySQL</a>  </p>
  </blockquote>
  
  
  
  <p>I want to get the IP address from <code>$_SERVER['REMOTE_ADDR']</code> and some other <code>$_SERVER</code> variables, which datatype is the right one for this?</p>
  
  <p>Is it <code>VARCHAR(n)</code>?</p>