我使用一个Python驱动程序(mysql.connector)并执行以下操作:呼叫到MySQL cursor.execute()(Python的驱动程序)挂
_db_config = { 'user': 'root', 'password': '1111111', 'host': '10.20.30.40', 'database': 'ddb' }
_connection = mysql.connector.connect(**_db_config) # connect to a remote server
_cursor = _connection.cursor(buffered=True)
_cursor.execute("""SELECT * FROM database LIMIT 1;""")
在某些情况下,调用_cursor.execute()挂起没有例外
顺便说一句,连接到本地MySQL服务器时,它似乎是确定
从第三行删除';' –
@BillalBEGUERADJ我一开始以为它解决了我的问题,但不幸的是它不是。我仍然得到这些挂起,并且超时也没有解决它:-( –
SQL查询本身不是那种消耗那个时间的东西......当你直接从命令行运行查询时,你观察到同样的事情吗? –