Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] ky10 aarch64 mysql-connector-python cannot connect to FE #31857

Closed
2 of 3 tasks
Bruceve1n opened this issue Mar 6, 2024 · 2 comments · Fixed by #32177
Closed
2 of 3 tasks

[Bug] ky10 aarch64 mysql-connector-python cannot connect to FE #31857

Bruceve1n opened this issue Mar 6, 2024 · 2 comments · Fixed by #32177

Comments

@Bruceve1n
Copy link

Bruceve1n commented Mar 6, 2024

Search before asking

  • I had searched in the issues and found no similar issues.

#29334
this issue is not helpful

Version

1.2.4.1
$ md5sum apache-doris-1.2.4.1-bin-aarch64.tar.xz
888b211ad73a33c6a103e930c48f9135 *apache-doris-1.2.4.1-bin-aarch64.tar.xz

What's Wrong?

when I use mysql-connector-python 8.0.23 to 8.0.28 version, like py2.py3-none-any.whl package
connect doris

return

Traceback (most recent call last):
File "test.py", line 9, in
cnx = mysql.connector.connect(**config)
File "/usr/local/lib/python3.7/site-packages/mysql/connector/init.py", line 278, in connect
return MySQLConnection(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/mysql/connector/connection.py", line 108, in init
self.connect(**kwargs)
File "/usr/local/lib/python3.7/site-packages/mysql/connector/abstracts.py", line 1003, in connect
self._open_connection()
File "/usr/local/lib/python3.7/site-packages/mysql/connector/connection.py", line 355, in _open_connection
self._ssl, self._conn_attrs)
File "/usr/local/lib/python3.7/site-packages/mysql/connector/connection.py", line 220, in _do_auth
self._auth_switch_request(username, password)
File "/usr/local/lib/python3.7/site-packages/mysql/connector/connection.py", line 236, in _auth_switch_request
packet = self._socket.recv()
File "/usr/local/lib/python3.7/site-packages/mysql/connector/network.py", line 267, in recv_plain
raise errors.InterfaceError(errno=2013)
mysql.connector.errors.InterfaceError: 2013: Lost connection to MySQL server during query

but this script work fine on mysql 5.7

What You Expected?

return 1

How to Reproduce?

this is my linux

Linux version 4.19.90-24.4.v2101.ky10.aarch64 (KYLINSOFT@localhost.localdomain) (gcc version 7.3.0 (GCC)) #1 SMP Mon May 24 14:45:37 CST 2021

this is my script

import mysql.connector

config = dict()
config['user'] = 'root'
config['password'] = 'password'
config['host'] = 'ip'
config['port'] = '9030'
config['autocommit'] = True
cnx = mysql.connector.connect(**config)
cursor = cnx.cursor(dictionary=False, buffered=True)
cursor.execute('select 1')
result = cursor.fetchall()
print(result)

while doris work fine

when I use mysql client login FE, show backends;
all BE are alive

Anything Else?

I use pyMysql , PyMySQL-1.0.2-py3-none-any.whl
it works fine

this is my script
import pymysql

connection = pymysql.connect(host='your_host',
port=9030,
user='your_username',
password='your_password',
cursorclass=pymysql.cursors.DictCursor)
try:
with connection.cursor() as cursor:
cursor.execute('SELECT 1')
result = cursor.fetchone()
print(result)
finally:
connection.close()

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@liujiwen-up
Copy link
Contributor

Only versions below mysql-connector-python 8.0.16 can connect
We will strive to optimize and make it compatible in the future.

@Bruceve1n
Copy link
Author

Only versions below mysql-connector-python 8.0.16 can connect We will strive to optimize and make it compatible in the future.

but on x86, mysql_connector_python-8.0.23-cp36-cp36m-manylinux1_x86_64.whl can connect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants