When updating a table entry, most strings work just fine but some don't. I assume it is related to the string length. For example, the strings "12345678" and "1234567890" work while the string "123456789" doesn't. Instead of correctly updating the entry, it throws a
OperationalError: 2055: Lost connection to MySQL server at '...:3306', system error: 60 Operation timed out
My script uses:
Python 3.7.6
mysql-connector-python 8.0.19
The db is running on the following system:
Server: Localhost via UNIX socket
Server type: MariaDB
Server connection: SSL is not being used Documentation
Server version: 10.4.12-MariaDB-1:10.4.12+maria~bionic - mariadb.org binary distribution
Protocol version: 10
Server charset: UTF-8 Unicode (utf8mb4)
Apache
Database client version: libmysql - mysqlnd 5.0.12-dev
Code that does not work:
mydb = mysql.connector.connect(...)
cursor = mydb.cursor()
cursor.execute('UPDATE table_1 SET name = "123456789" WHERE id = 1;')
OperationalError: 2055: Lost connection to MySQL server at '...:3306', system error: 60 Operation timed out
My script uses:
Python 3.7.6
mysql-connector-python 8.0.19
The db is running on the following system:
Server: Localhost via UNIX socket
Server type: MariaDB
Server connection: SSL is not being used Documentation
Server version: 10.4.12-MariaDB-1:10.4.12+maria~bionic - mariadb.org binary distribution
Protocol version: 10
Server charset: UTF-8 Unicode (utf8mb4)
Apache
Database client version: libmysql - mysqlnd 5.0.12-dev
Code that does not work:
mydb = mysql.connector.connect(...)
cursor = mydb.cursor()
cursor.execute('UPDATE table_1 SET name = "123456789" WHERE id = 1;')