mariadb

Convert stringified json objects to json

Convert stringified json objects to json Question: I’m using MariaDB, and unfortunately, json objects are returned as strings. I want to convert these stringified json objects back to json, but the problem is – I only want to do so if they are actually json objects, and ignore all fields that are, for example, just …

Total answers: 2

IndexError: list index out of range, error pulling 1 item from database

IndexError: list index out of range, error pulling 1 item from database Question: I’m developing an inventory control system in python and I had a problem when I need to pull data from the bank to see if it already exists this is my code: import mariadb banco = mariadb.connect( host="127.0.0.1", user="root", passwd="", database="controle_estoque" ) …

Total answers: 1

Connect MariaDB on raspberrypi from remote over same network

Connect MariaDB on raspberrypi from remote over same network Question: I have installed mariaDb (Mysql) on my raspberry pi .I am trying to connect my db using python from another machine over the same network but I receive the below error . self.sock.connect(sockaddr) ConnectionRefusedError: [Errno 61] Connection refused The above exception was the direct cause …

Total answers: 1

Python MariaDB cant select items from table

Python MariaDB cant select items from table Question: I am currently attempting to read data out of a Table in my MariaDB database, but whenever I run the code it returns None, as if the table was empty, which it isnt. I used the SQL command provided by the database. Any ideas? import sys import …

Total answers: 1

Better strategy to update mysql table on distinct column from another table

Better strategy to update mysql table on distinct column from another table Question: I have 2 mysql-tables (MariaDB) – games and lineups where the latter is filled from a third source. The logic behind them is: Each entry in the first table ‘games’ should have corresponding multiple entries of players participating in the respective game …

Total answers: 1

pandas dataframe.to_sql throws error when writing to MariaDB

pandas dataframe.to_sql throws error when writing to MariaDB Question: When I try and execute the code below, python gives me a mariadb.ProgrammingError: Cursor is closed even though the data was successfully written to the db. I guess there is something wrong with returning the rowcount (see the full traceback below). Is this a possible bug …

Total answers: 3

Packet sequence number wrong – got 1 expected 0

Packet sequence number wrong – got 1 expected 0 Question: Getting the below error in MariaDb and its causing timeout issue : Debugged it with removing skip-name-resolve, granting privileges to user@localhost, and in pyton create_engine used pool_pre_ping = True and pool_recycle=3600 but nothing seems to solve the issue. MariaDb version is 10.4.20 and Python is …

Total answers: 1

Error connecting to MariaDB from Linux Environment: ImportError: libmariadb.so.3: cannot open shared object file: No such file or directory

Error connecting to MariaDB from Linux Environment: ImportError: libmariadb.so.3: cannot open shared object file: No such file or directory Question: I am trying to connect to MariaDB using a python connector from a linux machine and while doing so I am getting the following error; (venv) [admin@server connector_testing]$ python mariadb_connector.py Traceback (most recent call last): …

Total answers: 3

ROCKSDB Failed to acquire lock due to rocksdb_max_row_locks

ROCKSDB Failed to acquire lock due to rocksdb_max_row_locks Question: I’m trying to load a CSV in to my rocksdb database, but it fails and show me this error: Got error 10 ‘Operation aborted:Failed to acquire lock due to rocksdb_max_row_locks limit’ from ROCKSDB I’ve tried with SET SESSION rocksdb_max_row_locks=1073741824; but same error always. What can I …

Total answers: 1