Category "mysql"

Tunning MYSQL have many schemas

I have a DB MYSQL with many schema. Around 5k - 7k schemas. My system sometime meet OOM Killer case. Is that unnormal ? we have 5 scheme different structure. Th

Tunning MYSQL have many schemas

I have a DB MYSQL with many schema. Around 5k - 7k schemas. My system sometime meet OOM Killer case. Is that unnormal ? we have 5 scheme different structure. Th

Adding Keepalive option to MySQL connection causes error "Unable to connect to any of the specified MySQL hosts"

I am working on a project where a thread is run and opens a permanent database connection. The reason for this, is potentially as the project grows it could rec

Mysql exists operator not working correctly or there is any other problem?

I have two tables txn_maxvoucherno (companycode, dbcode, vouchertype, fyear, series, voucherno) txn_vouchersdetails (voucherno, vouchertype) I am executing a st

Temporary table deletion cant find the temporary table(no such file or directory)

SQLSTATE[HY000]: General error: 6 Error on delete of '/tmp/#sql_10f07_0.MAI' (Errcode: 2 "No such file or directory") this error has started to pop up every no

Pythonanywhere MySQL-Connetion from outside

I tried to connect to my MySQL-Database from my Home-PC and got the error: 'Can't connect...' Inside this Server with Skript and Konsole I've got no problems, b

MySQL importing and replace [duplicate]

I have a table with 2 columns: Id | Date 1 | 2022-04-01 With tons of row, like 30k I need modify all the dates, so I want to upload a CSV wi

how to fetch data and tag Element but not json data using axios from php Apache server in XAMP?

I have a front end code of react is import React,{useEffect,useState} from "react"; import axios from 'axios' export default function DataGridDemo() { con

Get top n records for each group of grouped results

The following is the simplest possible example, though any solution should be able to scale to however many n top results are needed: Given a table like that b

Uncaught Error: Class 'Service\UsersService' not found

I'm trying to run my php-based application, which connects to a mysql DB, launched through docker-compose. i get this message when i connect to localhost: Fatal

Query to get Woo products in a parent-children order

I want to build a MySQL query for a Woo database schema to get simple/variable products, but in a specific order: I want to get them in an ID ASCending order, b

Modify MySQL query to produce to right data

I am trying to produce a data from a football table. The table can be seen below and the data that is needed is highlighted. The data that needs to be produced

Trying to utilize a window function instead of this script

I'm trying to improve my query for this topic at hand. I'm trying to find the top 5 and bottom 5 growth rates per state from 2020 to 2021 in my org. The table h

What does a zero value coalesce function do?

I have been exploring dbt tools and I came across the following code snippet : coalesce(customer_orders.number_of_orders, 0) as number_of_orders I understand th

Mysql WHERE condition against a JSON_TABLE value

I got a list of IDs as comma seperated list of JSON values and some example data sets are like below [340596,340597,340595] This list can be huge sometimes 50k

Generate sales report using MySql and Php

I m looking for advices in report generating per client, per product, per salesman, in a given period, using mysql and php. I m currently working on an applicat

Getting records by date is multiples of 30 days

I have the following query to get appointments that need remind once a month if they are not done yet. I want to get records with 30, 60, 90, 120,etc... in the

Get mySQL full text match score for strings not in the table (optimally in a mixed result set with matches from the table)?

This must be a niche scenario since I have not been able to find a similar question around and in my brief testing in my SQL workbench just using the string in

How to error handling curl and mysql in python subprocess.run()

I have python script which uses subprocess.run() getting dump file by curl and input dump file by mysql cmd = "curl {0}/{1} -o /tmp/{2}".format(dir_name,file_na

Mysql get end date excluding weekends

in Mysql I am trying to get end date excluding weekends like my function GET_DATE_WEEKDAYS('2022-03-24',5) giving - 2022-03-17 which is fine it is giving issue