Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

Questions tagged [mysql]

All versions of MySQL (not Microsoft SQL Server). Please also add a version-specific tag like mysql-5.7 if that is relevant to the question.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
9 views

Migration of MYSQL Replication set from AWS RDS to EC2 without data loss

Hi everyone i am having a MYSQL replica set with 1 primary and 3 read replicas hosted in AWS RDS, I want to migrate the data to AWS EC2 instance without any downtime and no data loss. Please provide ...
user avatar
0 votes
1 answer
28 views

MYSQL select similar records sorted by field from another table

I have these tables movie_scores id movie_id user_id score 1 1 1 10 2 2 1 5 movies id name collection 1 Interstellar 1 2 The Dark Knight 2 3 The Shining 1 4 Forrest Gump 2 Here we know that ...
Bobby Redjeans's user avatar
-1 votes
0 answers
31 views

How can I solve the ERROR 1064 (42000) in mysql?

I am trying to set up MySQL Master-Slave Replication. I have successfully done everything except Starting and Testing my Replication, after entering sudo mysql, I run CHANGE MASTER TO MASTER_HOST='xx....
user avatar
0 votes
1 answer
20 views

A foreign key that references a table and another to reference the parent table (what's the alternative)

Background I am OK-ish at Database Design...and I am building out this layer first. It is for a KPI tracker app, for real estate investment businesses. The app's business requirements This KPI tracker ...
Mike Warren's user avatar
0 votes
1 answer
57 views

How to implement an "Apple or Orange but not both" constraint

A database schema design question: Suppose I want to design a database with Robots, Technicians and Sites. I want to use my database constraints to limit the data to prevent entering some nonsensical ...
rich p's user avatar
  • 233
1 vote
1 answer
31 views

MySQL Trigger updating second table based on History and computed values

The Goal: Update an secondary table called Lottery_Cycle when an INSERT occours on table Lottery_History with some computed values and checking previous data. Let's say a lottery with 25 numbers of ...
Wisdom's user avatar
  • 11
0 votes
1 answer
34 views

Table design for handling counter

i have requirement reward will give to user but reward have some condition a. reward can have limit hourly , daily , monthly here is table maintaining user reward tracker CREATE TABLE `...
Rahul Kumar's user avatar
0 votes
0 answers
14 views

PhpMyAdmin: How can I modify the hierarchy to show Tables and Views collapsible items?

I'm not sure how to describe this problem. I'm in the process of migrating a database to a new laptop. I installed XAMPP 5.6.20 which includes PHP, MySQL, and PhpMyAdmin. So I exported the SQL ...
Harry McKenzie's user avatar
1 vote
4 answers
92 views

are my expectations for mysql unrealistic?

I just made my first mysql database and table, but was surprised by slow performance of a simple select statement. My table has 400 million rows, and my select statement returns about 100,000 rows, ...
Trevor D's user avatar
0 votes
0 answers
36 views

Is it possible to use pt-table-checksum with the authentication plugin 'caching_sha2_password'?

I have a source - replica configuration which is running great. MySQL versions on both servers: 8.0.36-0ubuntu0.22.04.1. The user used for replication has the caching_sha2_password plugin mysql> ...
Ergest Basha's user avatar
  • 3,935
0 votes
0 answers
23 views

MySQL - SLAVE does not receive updates from "secondary" master?

I have the following setup If I write something in MASTER A, the slave receive the update, but if I write something in master B, the slave does not receive the update. Is this right? Is there a way ...
Astora's user avatar
  • 723
3 votes
0 answers
64 views

Are Innodb redo logs written atomically?

When flushing dirty pages from buffer pool to disk pages, it uses double write buffering to avoid half written pages. But redo logs do not have such mechanism. So, how does it prevent redo logs from ...
William's user avatar
  • 135
0 votes
0 answers
15 views

MySQL no selected database without setCatalog

I run this query select * from database_name.table_name over JDBC and it fails. It fails with the exception : SQLTransientConnectionException: (conn=4444889) No database selected Caused by: ...
Petar Vasiljevic's user avatar
3 votes
1 answer
41 views

fetching data from 2 10M+ rows tables

I need to run the following query on my production database, using 2 tables that contain more than 10M rows each : SELECT rm.parent_id as processed_media_id FROM render_medias rm JOIN processed_medias ...
VaN's user avatar
  • 131
1 vote
1 answer
22 views

Balance calculation problem with Foreign Exchange in Mysql

I am trying to make a current balance system for pre-accounting in mysql. I create receipts in different currencies and collect payments in different currencies. My main currency is Turkish Lira (TRY)....
Ali Turhan's user avatar
1 vote
2 answers
47 views

Access a MySQL storage with two independent instances [closed]

I tried to deploy MySQL deployment with Kubernetes, having three replicas which are accessing the same storage(PVC). Here is the configuration apiVersion: v1 kind: PersistentVolume metadata: name: ...
Sivakajan's user avatar
0 votes
0 answers
49 views

Schema suggestion for irregular time series data [closed]

Basically, I have one organisation postgers DB, where I am storing all the employee data, which contains information like name, designation, department, skills etc. High level tables as below : ...
Darshan Patel's user avatar
0 votes
0 answers
61 views

Recurring Server Downtime Issues with PHP MySQL Website

I've been encountering recurring server downtime issues with my PHP MySQL website for several months now, and despite having access to WHM and reviewing logs, I'm struggling to pinpoint the root cause....
Abdul Rehman's user avatar
0 votes
0 answers
20 views

New MySQL 8.0 slave added to a 5.7 Percona Mysql cluster is stuck Waiting for dependent transaction to commit

I've tried following several guides to add a new Percona cluster as a slave to another cluster. The new cluster will run MySQL 8.0 while the old cluster needs to continue running 5.7 for a few more ...
VagrantPaladin's user avatar
0 votes
1 answer
23 views

SQL and Management Nodes on same server in NDB cluster. SQL Nodes not connecting

I've setup a ndb cluster with 7 nodes. 3 data nodes on their own servers, and 2 management nodes that each have a sql node on them on 2 servers. I've narrowed down what I think my issue is. My cluster ...
Mr. Berzerk's user avatar
0 votes
1 answer
32 views

SQL Developer MySQL to Oracle migration auto_increment and identity columns

Ok, So in learning about migrating from MySQL 8 to Oracle 19 I have run into an issue. My tables in MySQL have auto_increment on the primary key. When I walk through the migration and get my master....
cptkirkh's user avatar
-1 votes
0 answers
18 views

mysql quer to get ten parent comments and child replies for each parent comments

here is my table i want to get parent comments with ten child replies for each parent comment Comment_id Comment_details Parent_comment_id Post_id 1 Aaaaaaaaa 0 1 2 Bbbbbbbb 0 1 3 Ccccccccccc 0 1 ...
justmasif's user avatar
-1 votes
1 answer
31 views

Why is DATEADD function not working?

I am trying to set a default datetime value for the column "AuctionEndDate" as the datetime one month from now. I'm using sql version 8.0.36, and I wrote several attempts, including: ALTER ...
rlaivsezlt's user avatar
1 vote
2 answers
137 views

Mysql query is too slow for what it is, help me debug it

I have the following query which takes about 5 seconds to complete, it used to be 0.5s, then 1s, 2s now we are at 5s despite the fact that the amount of data in database has not changed! This query ...
ratatata's user avatar
0 votes
1 answer
34 views

Is expected that indexes on binary columns perform slower than those on bigint columns?

Running MariaDB 10.8.8 I've had to implement geo-targeting on my site. For this each night I pull the free IP-to-country dataset from ipinfo.io. I have a PHP script that then creates two tables, ...
Codemonkey's user avatar
0 votes
0 answers
17 views

Azure MySQL and AWS RDS insert performance difference

We had to move our infra from AWS to Azure (reasons irrelevant) and I've set up a same spec DB instance on Azure, even a tier larger (2c/8g on AWS and 2c/16g on Azure, both memory optimized). What I'...
pyr0hu's user avatar
  • 1
0 votes
1 answer
18 views

Does MySQL invalidate or amend a cached table when rows are added, updated or deleted?

What does MySQL (InnoDB) do when it has cached an entire table into memory and one or more rows in that table changes? Does MySQL in this instance amend the cache in memory, or would it consider the ...
TheLegendaryCopyCoder's user avatar
0 votes
1 answer
54 views

Can high core CPU/low memory server cause swap memory usage or create slow-queries for queries using user defined variables in InnoDB? [closed]

Our team has recently updated our WAS Linux version from CentOS 7 to Rocky Linux 8 and faced a new warning that might be generated between WAS proxySQL and DB server MariaDB (Galera cluster to be ...
ukyanjo's user avatar
0 votes
2 answers
44 views

How do I prevent large table writes from hanging the database?

I have a Percona 8 MySQL Server, running via Docker, acting as the backing data store for a heavily used service. On the hour, a script will run that reads a value from a virtual column of ...
DSZ's user avatar
  • 125
3 votes
1 answer
387 views

"#1292 - Incorrect datetime value" when time is within one hour

I'm running into a bizarre error with a timestamp column in a MySQL DB. When inserting the date/time value, it fails with a #1292 error if the time is between 02:00:00 and 02:59:59. Here is a sample ...
lcdservices's user avatar
0 votes
1 answer
25 views

Is there a way to send DDL query asynchronously, disconnect client & poll for completion?

AFAICT when you send a query to MySQL from any client it always blocks and waits for the server to respond with success or failure. When performing a slow operation like adding a new index on large ...
Anentropic's user avatar
0 votes
2 answers
18 views

MySQL Partition creation in advance

We are migrating to mysql database. We have around 150-200 tables. All of the tables represent timeseries data. So we want to add partitioning in MySQL so that we can prune the data based on timestamp....
user avatar
0 votes
0 answers
13 views

AWS RDS MySQL read replica's failover and standby instance's failover

This question is for AWS RDS MySQL I have recently started studying RDS, trying to study from the documentation as well as other sources. For following scenario I am unable to understand certain ...
Avinash Pawar's user avatar
-1 votes
0 answers
46 views

Migrating Planetscale MySQL to Free PostgreSQL Host [closed]

I'm working on migrating a project's database from Planetscale MySQL to Supabase PostgreSQL. I've explored Supabase's migration tools but found the process a bit complex. I have backups of my ...
user avatar
0 votes
1 answer
44 views

Why does my IOPS keep increasing during bulk batch inserts?

The database in question: AWS RDS, MySQL 8, InnoDB. GP3 storage. I am attempting to do a bulk insert of rows to multiple tables in the db. I have omitted all secondary indexes from the target table, ...
Anentropic's user avatar
-1 votes
2 answers
38 views

How important is the "clustered" property of MySQL PK index?

I am importing ~50M rows into MySQL 8, InnoDB. It's on AWS RDS with GP3 storage. The unique key of the rows is a uuid-like string. When querying we will never care about this unique key, except when ...
Anentropic's user avatar
-1 votes
0 answers
21 views

Execute CHECK constraint only when the column's value is NOT NULL. MySQL

I wonder why CHECK constraints get executed when the value of a column is set to null. I only desire to CHECK when the column is set to a value (not null) I'll share to you the DDL CREATE TABLE `...
Lucas David Ferrero's user avatar
0 votes
0 answers
5 views

Migrating a web site from shared cPanel to unmanaged Ubuntu 22.04 vps and not able to successfully import an sql file

I got an unmanaged VPS from Hostinger a week ago and am trying to host a few web sites on the server. I have to say here that I am quite new to Ubuntu 22.04 with FASTPANEL. I have migrated the files ...
mgl's user avatar
  • 1
0 votes
0 answers
22 views

model for user, companies (departments, teams, jobs)

I want to start a new project and I am not sure which of the DB models to choose (from bellow). I am gonna use Mysql for the BD. The rules are: user belongs to one or many companies one company can ...
calin24's user avatar
  • 101
1 vote
1 answer
22 views

Will a replicated event cause issues?

I've got the replication configuration shown in the image. Everything replicates to everywhere. One of the tables maintains session data which has rows that must be deleted due to expiration. I ...
user22044385's user avatar
1 vote
2 answers
38 views

mysql threads connected more than processlist and established connectios

Recently we have been facing an issue with MySQL. We use Percona MySQL 8.0.21 and set max_connectios to 7000. Sometimes in peak times, we reach 7000 connections and when we run show status like '...
Ssaf's user avatar
  • 11
0 votes
2 answers
33 views

replicating one master to multiple slaves and from multiple slaves to one master

"I have successfully set up regular master-slave replication, but now I need to configure a more complex setup. Currently, I have one master database and 15 slave databases. My goal is to ...
Sameerul Anwar's user avatar
0 votes
1 answer
25 views

MySQL Stored Procedure security best practises

Sorry if this has been answered before but what is the "correct" way to set up security for a stored procedure? Scenario is I want execute permissions only for the logged on web user and ...
Andy's user avatar
  • 1
0 votes
0 answers
12 views

Why does removing `skip-grant-tables` cause resource conflict error for mysqld?

After hours of searching, I have managed to narrow a mysqld issue down to a point, which I cannot find reason for. I am attempting to launch multiple instances of mysqld on my Ubuntu server. When ...
user10709800's user avatar
1 vote
1 answer
21 views

MySQL tempfolder Full

I have a mysql server hosted in an Azure VM. This is a slave where the data is being replicated from an on premise Master. Configurations are mentioned below. users are frequently getting an error ...
Vinodh Ashok's user avatar
0 votes
0 answers
11 views

Percona Xtra backup -File ./ib_logfile0: 'open' returned OS error 71. Cannot continue operation

Is there any way to solve this error? xtrabackup --backup --user=backupuser2 --password='pass' --target-dir=/u02/backup/ xtrabackup: recognized server arguments: --server-id=1 --log_bin=mysql-bin.log -...
datascinalyst's user avatar
1 vote
1 answer
35 views

How to choose hardware for MYSQL Server in Azure - Flexible Server

I have a MYSQL Flexible Server in Azure with the following hardware configuration: MYSQL 8.0 Compute Tier: Business Critical - 16 vCores Size: E16ds_v4 Storage: 269 GB AutoScale IOPS RAM: 128 GB I ...
SakZepelin's user avatar
0 votes
0 answers
24 views

Handling deadlocks in Laravel during concurrent DELETE and INSERT , ON DUPLICATE KEY UPDATE operations

in Laravel I have a service which is not wrapped in a transaction and involves both INSERT ... ON DUPLICATE KEY UPDATE and DELETE statements targeting the same table, customers. INSERT INTO customers (...
u LoV's user avatar
  • 1
0 votes
0 answers
66 views

mySQL Server 8.0.36 failed at step: starting the server

error Here is the log: Attempting to run MySQL Server with --initialize-insecure option... Starting process for MySQL Server 8.0.36... Starting process with command: C:\Program Files\MySQL\MySQL ...
user avatar
2 votes
4 answers
122 views

Performance issues of a queue implemented on top of InnoDB

Brief problem statement First thing first: after posting this question originally and working more with our DBAs, I actually learned that our DB runs in a container, instead of being installed ...
Dmitry Frank's user avatar

1
2 3 4 5
449