In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
When pymysql connects to Inception, there will be a value error problem when judging the version.
The reason is that pymysql passed'.' To split, but the version information for Inception is like this
. / mysql-V
Ver 14.14 Distrib Inception2.1.50, for Linux (x86 / 64) using EditLine wrapper
The version of oracle mysql is:
Mysql Ver 14.14 Distrib 5.7.18, for Linux (x86 / 64) using EditLine wrapper
So the value obtained by Pymysql is Inception2, and finally int () reports to value error.
You can simply modify pymysql connections.py (just solve the problem and don't know much about the specific code)
Def _ request_authentication (self): # https://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::HandshakeResponse if self.server_version.split ('.', 1) [0] = = 'Inception2': self.client_flag | = CLIENT.MULTI_RESULTS elif int (self.server_version.split (', 1) [0]) > = 5: self.client_flag | = CLIENT.MULTI_RESULTS
The configuration using Pymysql connection can be as follows
Conn = pymysql.connect (host='127.0.0.1', user='', passwd='', db='', port=6669, autocommit=True, cursorclass=pymysql.cursors.DictCursor, charset='utf8mb4')
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 298
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.