title: What does "Unknown MySQL server host '192.12xx.xxx.xxx" mean?
body: <p>I can't connect remote server MySQL using Python. </p>
  
  <p><strong>first.py</strong></p>
  
  <pre><code>#!/usr/bin/python
  import MySQLdb
  import second
  
  DBHostname = second.hostname
  DBuser = second.user
  DBPWD = second.passwd
  DB = second.db
  
  dbcon = MySQLdb.connect(host=DBHostname,user=DBuser,passwd=DBPWD,db=DB)
  dbcur = dbcon.cursor()
  try:
      dbcur.execute("select * from push_time where userid = %s", (e100075))
      data = dbcur.fetchall() #Fetch all of the rows from query
      for row in data : #Get Data's
          wait_time = row[2]
          print wait_time
          dbcon.commit()
  except:
      dbcon.close()
  </code></pre>
  
  <p><strong>second.py</strong></p>
  
  <pre><code>#!/usr/bin/python
  
  hostname = "192.12XX.XXX.XXX"
  user = "user"
  passwd = "password"
  db = "dbname"
  </code></pre>
  
  <p>After running this program, I got the following error:  </p>
  
  <pre><code>_mysql_exceptions.OperationalError: (2005, "Unknown MySQL server host '192.XXXX.XXX.XXX' (2)")
  </code></pre>
  
  <p>What am I doing wrong?</p>