gavinchou opened a new issue, #29334:
URL: https://github.com/apache/doris/issues/29334

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   2.0.3 (or may be all versions of doris)
   
   ### What's Wrong?
   
   Cannot connect to doris with mysql-connector-python-8.2.0 (install with pip3 
by default on macOS ventura)
   ```
   pip3 install mysql-connector-python
   ```
   the following code does not work
   ```
   import mysql.connector
   
   cnx = mysql.connector.connect(user='gavin', password='pass', 
host='localhost', port=8030)
   cnx.connect()
   cursor = cnx.cursor()
   cursor.execute("show databases;")
   for i in cursor:
       print(i)
   cnx.close()
   
   ```
   
   it throws the following error
   ```
   Traceback (most recent call last):
     File "/Users/user/workspace/python/mysql-connector/mysql_test.py", line 3, 
in <module>
       cnx = mysql.connector.connect(user='user', password='gavin', 
host='localhost', port=8030)
     File 
"/Users/user/Library/Python/3.9/lib/python/site-packages/mysql/connector/pooling.py",
 line 294, in connect
       return MySQLConnection(*args, **kwargs)
     File 
"/Users/user/Library/Python/3.9/lib/python/site-packages/mysql/connector/connection.py",
 line 169, in __init__
       self.connect(**kwargs)
     File 
"/Users/user/Library/Python/3.9/lib/python/site-packages/mysql/connector/abstracts.py",
 line 1237, in connect
       self._open_connection()
     File 
"/Users/user/Library/Python/3.9/lib/python/site-packages/mysql/connector/connection.py",
 line 355, in _open_connection
       self._do_auth(
     File 
"/Users/user/Library/Python/3.9/lib/python/site-packages/mysql/connector/connection.py",
 line 288, in _do_auth
       ok_pkt = self._authenticator.authenticate(
     File 
"/Users/user/Library/Python/3.9/lib/python/site-packages/mysql/connector/authentication.py",
 line 376, in authenticate
       pkt = bytes(sock.recv())
     File 
"/Users/user/Library/Python/3.9/lib/python/site-packages/mysql/connector/network.py",
 line 631, in recv
       return self._netbroker.recv(self.sock, self.address)
     File 
"/Users/user/Library/Python/3.9/lib/python/site-packages/mysql/connector/network.py",
 line 231, in recv
       header = self._recv_chunk(sock, size=PACKET_HEADER_LENGTH)
     File 
"/Users/user/Library/Python/3.9/lib/python/site-packages/mysql/connector/network.py",
 line 178, in _recv_chunk
       raise InterfaceError(errno=2013)
   mysql.connector.errors.InterfaceError: 2013: Lost connection to MySQL server 
during query
   ```
   
   
   however the older version works
   ```
    pip3 install --force-reinstall -v "mysql-connector-python==8.0.16"
   ```
   
   ### What You Expected?
   
   Get connected to doris FE with mysql-connector-python-8.2.0
   
   ### How to Reproduce?
   
   install with pip3 mysql-connector-python-8.2.0 (by default on macOS ventura)
   ```
   pip3 install mysql-connector-python
   ```
   run the following code
   ```
   import mysql.connector
   
   cnx = mysql.connector.connect(user='gavin', password='pass', 
host='localhost', port=8030)
   cnx.connect()
   cursor = cnx.cursor()
   cursor.execute("show databases;")
   for i in cursor:
       print(i)
   cnx.close()
   ```
   
   
   ### Anything Else?
   
   A tcpdump shows that doris FE ended the connection prematurely
   
   <img width="1513" alt="image" 
src="https://github.com/apache/doris/assets/6919662/e4a9bffb-a861-4163-99d7-ba1db9ae2671";>
   
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to