MySQL Forums
Forum List  »  Connector/Python

Socket Request
Posted by: Laurent Mausservey
Date: February 11, 2009 10:17AM

Hi
While waitting for the Python 3 - MySql 6 connector,
I tryed the python script :

import socket
import sys

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('localhost', 3306))
d=s.recv(1024)
print_d(d)

and got the message :
b'C\x00\x00\x00\n6.0.9-alpha-community\x00\x01\x00\x00\x00BM>-d3q_\x00\xff\xf7\x08\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00gj_|qD>H.O$a\x00'

so it works ! :)

The next Steps is :
- What is the string to send for login in a database ?
- What are the strings to send for a SQL Request (DDL, DML, TCL)
- the main topic for the 'd=s.recv(1024)' (dataframe counting)

Thanx ! :)

Options: ReplyQuote


Subject
Written By
Posted
Socket Request
February 11, 2009 10:17AM


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.