try:
self.db = mysql.connector.connect(host='localhost', user='root',
password='blah', database='env')
self.db.autocommit = True
except mysql.connector.Error as e:
print("\n\nError: "+e.msg+" ("+str(e.errno)+")")
C:\Python32\lib\site-packages\mysql\connector\connection.py in connect(self=<mysql.connector.connection.MySQLConnection object>, **kwargs={'database': 'env', 'host': 'localhost', 'password': 'blah', 'user': 'root'})
330
331 self.disconnect()
=> 332 self._open_connection()
333 self._post_connection()
334
self = <mysql.connector.connection.MySQLConnection object>, self._open_connection = <bound method MySQLConnection._open_connection o...sql.connector.connection.MySQLConnection object>>
C:\Python32\lib\site-packages\mysql\connector\connection.py in _open_connection(self=<mysql.connector.connection.MySQLConnection object>)
291 self._socket = self._get_connection()
292 self._socket.open_connection()
=> 293 self._do_handshake()
294 if self._client_flags & ClientFlag.SSL:
295 self._socket.set_ssl(self._ssl['ca'], self._ssl['cert'],
self = <mysql.connector.connection.MySQLConnection object>, self._do_handshake = <bound method MySQLConnection._do_handshake of <mysql.connector.connection.MySQLConnection object>>
C:\Python32\lib\site-packages\mysql\connector\connection.py in _do_handshake(self=<mysql.connector.connection.MySQLConnection object>)
121 except Exception as err:
122 raise errors.InterfaceError(
=> 123 'Failed parsing handshake; {}'.format(err))
124
125 regex_ver = re.compile(b"^(\d{1,2})\.(\d{1,2})\.(\d{1,3})(.*)")
err undefined
InterfaceError: Failed parsing handshake; end byte not precent in buffer
args = ()
errno = -1
msg = 'Failed parsing handshake; end byte not precent in buffer'
sqlstate = None
with_traceback = <built-in method with_traceback of InterfaceError object>| Subject | Written By | Posted |
|---|---|---|
| Error: Failed parsing handshake; end byte not precent in buffer (-1) | Beth Hartman | 10/10/2012 11:42AM |
| Re: Error: Failed parsing handshake; end byte not precent in buffer (-1) | Andrii Nikitin | 10/22/2012 07:12AM |
| Re: Error: Failed parsing handshake; end byte not precent in buffer (-1) | Charles Barros | 12/17/2012 12:49PM |
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.