
samucabh
(usa Ubuntu)
Enviado em 27/08/2009 - 10:07h
o Código:
import MySQLdb
con=MySQLdb.connect(host='localhost',user='root',passwd='senha',db='basedados')
c=con.cursor()
c.execute("""
load data infile "saida.txt" into table clientes
fields terminated by ";" lines terminated by "\n"
""")
con.close()
o ERRO:
/usr/bin/python -u "/home/samuel/Desktop/bd.bak"
/var/lib/python-support/python2.6/MySQLdb/__init__.py:34: DeprecationWarning: the sets module is deprecated
from sets import ImmutableSet
Traceback (most recent call last):
File "/home/samuel/Desktop/bd.bak", line 7, in <module>
""")
File "/var/lib/python-support/python2.6/MySQLdb/cursors.py", line 166, in execute
self.errorhandler(self, exc, value)
File "/var/lib/python-support/python2.6/MySQLdb/connections.py", line 35, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.InternalError: (29, "File '/var/lib/mysql/testeport/saida.txt' not found (Errcode: 2)")