MySQL Forums
Forum List  »  MySQL Administrator

Re: remote access to database
Posted by: bhanu kiran
Date: May 26, 2009 11:48PM

See, i am working on Python and MySQL.
In my code, if anyone enter all the values in a form and click the "submit" button, then it automatically insert into local database and automatically updated in the remote database .
Here, we use IP address for the remote access.

try:
import MySQLdb
import _mysql_exceptions as DB_EXC
cxn = MySQLdb.connect(host ='192.168.1.23')
cur = cxn.cursor()
cur = cxn.cursor()
no = cur.execute("select * from navicat.temp1") ## this is the database query you have to write.
cur.close()
cxn.commit()
cxn.close()
except ImportError , e:
return None

we write like this.

Options: ReplyQuote


Subject
Written By
Posted
Re: remote access to database
May 26, 2009 11:48PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.