about accessing mysql

S

sinan ,

hi everybody, i have a small mysql connection code
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.3/site-packages/MySQLdb/__init__.py", line
66, in Connect
return Connection(*args, **kwargs)
File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line
156, in __init__
self.autocommit(0)
_mysql_exceptions.OperationalError: (1193, "Unknown system variable
'AUTOCOMMIT'")
these command works at my computer but when i want to do in my server,
i get these messages as you seen, my both computer and server have
same python, same MySQLdb module and same database with same
priviliges.also how can i connect to remote database? is that work ?
db=MySQLdb.Connection(host="192.168.0.120",user="root",db="nux")
thank you.
 
D

Diez B. Roggisch

sinan said:
hi everybody, i have a small mysql connection code



Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.3/site-packages/MySQLdb/__init__.py", line
66, in Connect
return Connection(*args, **kwargs)
File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line
156, in __init__
self.autocommit(0)
_mysql_exceptions.OperationalError: (1193, "Unknown system variable
'AUTOCOMMIT'")


these command works at my computer but when i want to do in my server,
i get these messages as you seen, my both computer and server have
same python, same MySQLdb module and same database with same
priviliges.also how can i connect to remote database? is that work ?
db=MySQLdb.Connection(host="192.168.0.120",user="root",db="nux")
thank you.

Are you aware that transactions are a very recent feature of mysql and
that tables have to be created as InnoDB tables? I don't know much about
that stuff but can imagine that on your server this has not been done
properly.

Diez
 
S

sinan ,

hi,
my table types are MyISAM both local and server, my code can reach to
my locals mysql but cannot reach when running on server.
 
D

deelan

sinan , wrote:
(...)
these command works at my computer but when i want to do in my server,
i get these messages as you seen, my both computer and server have
same python, same MySQLdb module and same database with same
priviliges.also how can i connect to remote database? is that work ?
db=MySQLdb.Connection(host="192.168.0.120",user="root",db="nux")
thank you.

in addition to Diez observations please tell us:

1) version of mysql server you are trying to connect
1a) is the the mysql db been complied to support Innodb tables?
please issue a "SHOW VARIBLES" command on the mysql console, there
should be some mention on innodb support somewhere.

2) version of mysqldb you are using

bye.
 
S

sinan ,

i checked innodb support via show variable. they have both same support.
mysql version is 4.0.24_Debian-5-log
MySQLdb module version is 1.2.1g2
they are same packets in debian.
thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,241
Messages
2,571,219
Members
47,852
Latest member
PatriciaMu

Latest Threads

Top