Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account

Connecting the Database and Python not through local host

-1

38 views

I'm Using Python and connecting through the Database .. Python is connected with android Operating system through Network IP connection not using the local host and the MYSQL connection is

`enter code here`

 conn = MySQLdb.connect (host = "localhost",
                       user = "root",
                       passwd = "newpassword",
                       db = "gamey")

x=conn.cursor()
x.execute("SELECT *  FROM location")
rowx = x.fetchall()
wait_timeout =  28800

So it host is local host 127.0.0.1 where i need it to be run the data base in the same network of the Python and android because i'm fetching things from database through android so do i have to change the local host to be the IP address working on ?

Due to i'm getting such errors

enter code here

 OperationalError: (2013, 'Lost connection to MySQL server during query')

then

enter code here
  OperationalError: (2006, 'MySQL server has gone away')

asked June 25, 2011 7:59 am CDT
posted via StackOverflow

0 Answers

Be the first to answer this question

Join with account you already have


Sign in with Twitter account
Sign in with Facebook account
Sign in with Google Friend Connect

Preview
Similar questions