You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Script output:
Traceback (most recent call last):
File "./core.py", line 5, in
conn = mysql.connector.connect(**config)
File "/usr/lib/python3.4/site-packages/mysql/connector/init.py", line 173, in connect
return MySQLConnection(*args, **kwargs)
File "/usr/lib/python3.4/site-packages/mysql/connector/connection.py", line 102, in init
self.connect(**kwargs)
File "/usr/lib/python3.4/site-packages/mysql/connector/abstracts.py", line 737, in connect
self._post_connection()
File "/usr/lib/python3.4/site-packages/mysql/connector/abstracts.py", line 713, in _post_connection
self.autocommit = self._autocommit
File "/usr/lib/python3.4/site-packages/mysql/connector/abstracts.py", line 530, in autocommit
self.cmd_query("SET @@session.autocommit = {0}".format(switch))
File "/usr/lib/python3.4/site-packages/mysql/connector/connection.py", line 553, in cmd_query
result = self._handle_result(self._send_cmd(ServerCmd.QUERY, query))
File "/usr/lib/python3.4/site-packages/mysql/connector/connection.py", line 314, in _send_cmd
return self._socket.recv()
File "/usr/lib/python3.4/site-packages/mysql/connector/network.py", line 251, in recv_plain
raise errors.InterfaceError(errno=2013)
mysql.connector.errors.InterfaceError: 2013: Lost connection to MySQL server during query
centos 7 kernel 3.10.0-693.11.1.el7.x86_64
rpm -ivh https://github.com/sysown/proxysql/releases/download/v2.0.5/proxysql-2.0.5-1-centos7.x86_64.rpm
cat /etc/proxysql.cnf
datadir="/var/lib/proxysql"
scheduler=
(
)
admin_variables = {
mysql_ifaces = "127.0.0.1:6032;/tmp/proxysql_admin.sock"
admin_credentials = "FIXIT"
}
mysql_variables = {
interfaces = "0.0.0.0:3306;/tmp/proxysql.sock"
monitor_username = "monitor"
monitor_slave_lag_when_null = "9000"
monitor_password = "FIXIT"
}
mysql_users:
(
{ username = "login2", password = "pass1", default_hostgroup = 2, max_connections = 300, fast_forward = 0 })
mysql_servers =
()
mysql_replication_hostgroups=
()
mysql_query_rules:
()
Test script:
#!/usr/bin/python3.4
import mysql.connector
config = {'port': 3306, 'host': '10.0.4.100', 'password': 'pass1', 'database': 'base', 'user': 'login2' }
conn = mysql.connector.connect(**config)
Script output:
Traceback (most recent call last):
File "./core.py", line 5, in
conn = mysql.connector.connect(**config)
File "/usr/lib/python3.4/site-packages/mysql/connector/init.py", line 173, in connect
return MySQLConnection(*args, **kwargs)
File "/usr/lib/python3.4/site-packages/mysql/connector/connection.py", line 102, in init
self.connect(**kwargs)
File "/usr/lib/python3.4/site-packages/mysql/connector/abstracts.py", line 737, in connect
self._post_connection()
File "/usr/lib/python3.4/site-packages/mysql/connector/abstracts.py", line 713, in _post_connection
self.autocommit = self._autocommit
File "/usr/lib/python3.4/site-packages/mysql/connector/abstracts.py", line 530, in autocommit
self.cmd_query("SET @@session.autocommit = {0}".format(switch))
File "/usr/lib/python3.4/site-packages/mysql/connector/connection.py", line 553, in cmd_query
result = self._handle_result(self._send_cmd(ServerCmd.QUERY, query))
File "/usr/lib/python3.4/site-packages/mysql/connector/connection.py", line 314, in _send_cmd
return self._socket.recv()
File "/usr/lib/python3.4/site-packages/mysql/connector/network.py", line 251, in recv_plain
raise errors.InterfaceError(errno=2013)
mysql.connector.errors.InterfaceError: 2013: Lost connection to MySQL server during query
Proxysql log:
Error: signal 11:
proxysql(_Z13crash_handleri+0x1a)[0x4a226a]
/lib64/libc.so.6(+0x36280)[0x7fe12dbaf280]
/lib64/libc.so.6(+0x15aea6)[0x7fe12dcd3ea6]
proxysql(_ZN13MySQL_Session21handler_SetAutocommitEP10_PtrSize_t+0x382)[0x4ecc32]
proxysql(_ZN13MySQL_Session23handler_special_queriesEP10_PtrSize_t+0x45b)[0x4f8aeb]
proxysql(_ZN13MySQL_Session7handlerEv+0xe4e)[0x4f9f6e]
proxysql(_ZN12MySQL_Thread20process_all_sessionsEv+0x1fc)[0x4dab6c]
proxysql(_ZN12MySQL_Thread3runEv+0xe16)[0x4e3fa6]
proxysql(_Z24mysql_worker_thread_funcPv+0x6c)[0x49ebcc]
/lib64/libpthread.so.0(+0x7dd5)[0x7fe12ed8edd5]
/lib64/libc.so.6(clone+0x6d)[0x7fe12dc76ead]
2019-07-11 15:39:38 main.cpp:1373:ProxySQL_daemonize_phase3(): [ERROR] ProxySQL crashed. Restarting!
Reproduce on proxysql with normal config (user, query rules, servers).
When update mysql_users set fast_forward=1; script not crash.
pip3.4 list | grep mysql-connector-python
mysql-connector-python 8.0.16
UPD: mysql -h -P -u -p -e 'SET @@session.autocommit=0;'
The text was updated successfully, but these errors were encountered: