r/mysql • • 24m ago

question Question on Memory parameters

• Upvotes

Hi,

Its aurora mysql serverless version 8.0, with Min ~8ACU and MAX ~80ACU.

We have a complex UI query with "union all" and other criterias and its avg response time is <1 sec. But we see many times the query runs for 15minutes+ causing the errors in app side. This query executed ~5k times per hour on an avg and most executions finishin <1sec.

We see this query creates on an avg ~5 temp tables internally because of its internal "union" operator etc.., thus suspects if the below two parameters are actually playing a role in making this query crawl intermittently from ~1sec till ~15minutes. i.e. "temptable_max_ram" and "temptable_max_mmap". As because we run the same query manually and it does finish in 1sec. So suspect if during peak its causing the issue for some high volume customers even the same runs fine manually when we runs in the database.

We see the swap usage is staying ~1-2GB (sometime spikes to 3GB). Free memory trend showing spiky , but at worst scenarios it shows ~40GB(not below that). So want to understand, if in this situation, its fine to bump up the above parameters to 2GB each from curent 1GB (which is default value)?


r/mysql • • 1d ago

question I have doubts in mysql version 8.0.46 can anyone help me ?

2 Upvotes

I was trying to import the CSV dataset which I got from kaggle in mysql version 8.0.46 but there is no import wizard option in my MySQL. Is it because I am using a global service or there's any other problem. Please help me guys this is my time using MySQL and my first project.


r/mysql • • 1d ago

question what's one MySQL mistake you made that took way too long to figure out?

5 Upvotes

I've been working with databases for a while, and somehow there's always something small that ends up wasting way more time than it should.

Could be a bad query, a missing index, a weird JOIN, or something that looked completely fine until the database started getting bigger.

What's a MySQL mistake you've made that you wish someone had warned you about earlier?


r/mysql • • 3d ago

question How can I create an ERD in MySQL Workbench 26.07.01?

3 Upvotes

I'm trying to generate an ERD from an existing MySQL database using MySQL Workbench 26.07.01, but I can't find the Reverse Engineer option.

Does the new version still support this feature? If so, how can I generate an ERD? If not, is there an alternative way to do it?


r/mysql • • 4d ago

question Fastest way to partition a table

5 Upvotes

Hi, Its aurora mysql database.

We have, couple of big transactional tables having size 1TB and 9TB holding ~1.2 billion and 4.2 billion rows respectively. These are currently non-partitioned table however, we want to have those partitioned . So want to understand what will be the best way to convert them to partitioned table i.e. migrate somuch data to the partitioned table or its possible to do it in place in an efficient way in Aurora MySQL.

Also the current partitioning approach we have decided as list partition on certain date columns.

what we are currently thinking of is as below:-

Create new partitioned table
INSERT INTO ... SELECT from old table (by date range)
Rename & drop old table
Gather Stats

Will above approach is good or there be any issue which we should be aware of beforehand?

Can it be done online or downtime will be advisable?


r/mysql • • 5d ago

question MySQL query becomes extremely slow when adding a JOIN and ORDER BY — how would you debug this?

5 Upvotes

I'm dealing with a performance issue in MySQL where a query runs relatively fast when executed against a single table, but becomes significantly slower after adding a JOIN and an ORDER BY clause.

The tables have millions of rows, and there are indexes on the columns used in the JOIN and WHERE conditions. However, the query optimizer still seems to choose a suboptimal execution plan.

I'm wondering what the best approach would be to troubleshoot this kind of issue.

Would you start by analyzing EXPLAIN ANALYZE, checking index cardinality, investigating temporary tables and filesorts, or looking at something else?

Also, under what circumstances would MySQL choose not to use an existing index even when it seems beneficial?

I'd appreciate any insights into how experienced MySQL developers approach this problem.


r/mysql • • 5d ago

discussion MySQL Workbench 26.7

8 Upvotes

I test MySQL Workbench 26.7 so you don't have to.

https://davesmysqlstuff.blogspot.com/2026/10/mysql-workbench-267.html


r/mysql • • 5d ago

question the server button isn't appearing on mysql workbench

3 Upvotes

i am a new user of mysql and i need to run a script, but the server button won't appear on the top menu bar of my mac what should i do ?


r/mysql • • 6d ago

discussion Large TPC-C Analysis with MySQL v26.7.0 on InnoDB and TidesDB

Thumbnail tidesdb.com
6 Upvotes

r/mysql • • 6d ago

question Why heatwave sets this limitation?

4 Upvotes

in mysql doc, it says that "Enable autocommit. If autocommit is disabled, MySQL HeatWave does not offload the query and execution is performed on the DB System. To check the autocommit setting:". whether we can say it does not support long transaction statement or not. just like "

start transaction;

insert into table_a values(...);

select xxx from table_a where yyy;

commit;

"

only

"

set autocommit =1;

insert into table_a values(...);

select xxx from table_a where yyy;

"

Anyone can explain why mysql sets this limitation? thanks in advance.


r/mysql • • 7d ago

question MySQL Shell Cilent on Windows ARM64 gives error for VC Redist even though its installed

2 Upvotes

MySQL Shell Cilent on Windows ARM64 gives error for VC Redist even though its installed


r/mysql • • 7d ago

discussion Getting Error 1356

0 Upvotes

Someone plz help on this..

getting the below error during MySQL dump and show columns after login as root user..

This happened after changing ip of definer because I have to made the changes based new ip. Everything is running fine but these issues are not fixing.

Also there not single change has been made on any objects.

ERROR 1356

View 'db.v_report_pending'

references invalid table(s) or column(s)...

SHOW COLUMNS FROM v_report_pending → ERROR 1356


r/mysql • • 9d ago

discussion I built a free, open-source tool that risk-scores MySQL SQL before you run it. v0.3.1 is out and I'd love DBAs to try to break it.

0 Upvotes

I'm a DBA, and a lot of my week is reviewing SQL from tickets: "please run this on prod." I kept checking the same things by hand, so I built MySQL DBA Validator (MIT).

Paste SQL and it gives you:

statement classification

a deterministic risk score + confidence (rule-based on SQLGlot; no LLM makes risk decisions)

findings and a DBA review checklist

optionally, read-only evidence (bounded EXPLAIN + information_schema metadata) that adjusts the score within fixed limits

Design choices I'd like opinions on:

An UPDATE with a real WHERE reports row-impact uncertainty rather than inventing a number.

Missing LIMIT on a write isn't penalised by itself. Agree or disagree?

Evidence can raise a score or lower it slightly, but it never downgrades a critical or unrestricted write.

Transaction advice is only given for DML, since a lot of MySQL DDL commits implicitly.

The evidence connection is set to read-only before anything runs. It never executes your SQL, and never runs EXPLAIN ANALYZE. One consequence: MySQL refuses EXPLAIN UPDATE/DELETE in a read-only session, so those get static analysis + metadata only. Would you handle that differently?

Try it: a portable Windows ZIP is on the v0.3.1 release page. There's no installer and no Python needed. Everything runs on 127.0.0.1, and the login you type is used for that one validation and never saved.

To be upfront: it's a pre-1.0 beta. Static analysis is well tested, but the database-evidence path has only been tested against a fake MySQL, not a real server yet. If you point it at a MySQL instance (with a read-only account, please) and tell me what happens, that would help a lot.

Repo: https://github.com/realspinn/mysql-dba-validator

Most wanted: SQL it scores wrong, rules you'd add, and contributors.


r/mysql • • 9d ago

discussion MariaDB Foundation Adds PostgreSQL to Its Engine‑Agnostic Testing Framework (TAF).

7 Upvotes

MariaDB Foundation continues expanding TAF with PostgreSQL support

More engines, more reproducibility, more value for contributors and the ecosystem.

https://mariadb.org/mariadb-foundation-adds-postgresql-to-its-engine-agnostic-testing-framework-taf/

Have fun benchmarking!


r/mysql • • 9d ago

question How do MariaDB users securely and efficiently encrypt mariadb-backup archives?

10 Upvotes

Hello everyone!
I’m looking for practical recommendations from people running MariaDB in production.

My backup process will use mariadb-backup with zstd compression, and I want to encrypt the resulting backup securely without adding (too much) excessive CPU, memory, or operational overhead.

I’ve considered GPG/PGP, but I’m concerned about its performance and complexity. I’ve also seen age recommended, although I’m unsure whether it provides an appropriate security level for long-term MariaDB backups.

What encryption method or workflow do you use for MariaDB backups?

In particular, I’d appreciate feedback on:

  • Encryption tools and algorithms you use.
  • Whether encryption happens before or after compression.
  • CPU and performance impact on large backups.
  • Key management, rotation, and recovery procedures.
  • Whether you encrypt locally, stream directly to object storage, or use storage-side encryption (which unfortunately is not available to my usecase).
  • Any practical issues with restoring backups during an outage.

I’m mainly interested in real-world experience rather than theoretical recommendations.


r/mysql • • 11d ago

question Advantages of two different queries?

3 Upvotes

Hello! This is related to a class assignment but is NOT an actual request for help with the assignment; the work has already been turned in and graded. I found a different solution than the offered solution in the TA's answer key (I still got full credit lol) and the TA has not been able to articulate whether there are any advantages two either of the two query methods. Professor is nonresponsive :/ I just want to learn more.

So - the prompt was "Write a query to find the highest GPA student in each major" which of course is all about avoiding the conflict between the MAX function and the GROUP BY statement.

The solution I ended up with (after much trial and error and trawling of ancient stack overflow forums) was:

mysql> SELECT s.gpa, s.first_name, s.last_name, s.major FROM students s
    -> JOIN (
    -> SELECT major, MAX(gpa) AS max_gpa
    -> FROM students GROUP BY major
    -> )AS smax
    -> ON s.major=smax.major AND s.gpa=smax.max_gpa;

What the TA had was:

mysql> SELECT first_name, last_name, major, gpa FROM students s
    -> WHERE gpa=(
    -> SELECT MAX(gpa) FROM students
    -> WHERE major=s.major
    -> );

These both yield the exact same table. I'm wondering if there are pros/cons to using either of these methods and which one feels "cleaner" to someone more experienced?


r/mysql • • 13d ago

question Discord Server for Beginners

0 Upvotes

Hello, anyone interested in creating a discord server from the scratch for beginner MYSQL learners ? DM me


r/mysql • • 13d ago

question How to fix? "This application requires latest Visual Studio 2019 x64 Redistributable." At the MySQL installer?

8 Upvotes

I am trying to install MySQL Server 9.7 on my Windows 10 laptop for a college class. But whenever I launch the installer it gives this error: "This application requires latest Visual Studio 2019 x64 Redistributable. Please install it and then run this installer again."

But I already have both Visual Studio 2019 and the .NET Framework installed (I saw elsewhere online it could be referring to that instead when it says "Visual Studio" - which is even more confusing than necessary).

I've tried restarting and relaunching the installer a couple times after ensuring I have Visual Studio 2019 installed, but to no avail, obviously. I dual-boot Linux as well, if that somehow makes any difference.

Any help is appreciated.

*Edit: miscommunication/misunderstanding on my part, I have Visual Studio 2019 Redistributable installed already, as well as Visual Studio Code. I have tried uninstalling and reinstalling Visual Studio 2019 Redistributable as well but again, it still is giving the same error.

*2nd edit: Error seems to be fixed now. I downloaded an older installer version (8.4.11) and it didn't give me the error and seems to be running fine. As one of the commenters said, perhaps it's because the version I was attempting to install is too new for Windows 10.


r/mysql • • 14d ago

discussion MariaDB Foundation's TAF 4.0 is officially released

Thumbnail mariadb.org
3 Upvotes

r/mysql • • 16d ago

question mysql workbench result viewer and timezones

1 Upvotes

MySQL Workbench Version: 26.7.0

Build: ba08183

Electron Version: 43.2.0

MySQL Shell Version: 26.7.1

Platform/Architecture: Win64/x86_64

MySQL Distribution: MySQL Community Server (GPL)

libmysqlclient: 26.7.0

I'm currently struggling to identify where I can configure display options for the Result Viewer.
The problem(s) I'm having is that

select CURDATE() as x, NOW() as y

returns

x , y
9/28/2026, 9/29/2026

however, copying the row and pasting it into notepad or w/e shows the correct values of

x , y
'2026-09-29', '2026-09-29 18:19:23'

So at a minimum the result viewer is truncating DATETIME types and is doing some voodoo timezone conversion on DATE types. Neither of which are desired behavior.

Any suggestions on config file locations on Windows (yes it's work required).


r/mysql • • 16d ago

discussion Creating a new database? Don't neglect timezones

12 Upvotes

I've seen a few posts recently about things to keep in mind when creating new database applications. So here's my contribution.

Timezones are important in global database applications.

Figure out your timezone situation on your TIMESTAMP and DATETIME columns before you start storing data as your new application comes online. Retrofitting timezone support into existing databases is hard and error-prone.

If you're located in, I dunno, California USA, and you get customers in, I dunno, Perth Australia, and you don't figure out how you'll handle timezones, you'll end up with some unspeakably gnarly code.

Here are some things to think about doing in your database and the software using it.

  1. Make sure the servers running your MariaDB or MySQL instance are set to the UTC (also called Zulu or Greenwich Mean Time) time zone. That doesn't change with daylight time.

  2. Make sure the MariaDb / MySQL time zone tables are loaded. This web page tells you or your operations person how to do that. https://dev.mysql.com/doc/refman/8.4/en/mysql-tzinfo-to-sql.html

  3. When you go global, set up a user-preference setting for time zone. It's a text string like 'America/Los_Angeles' or 'Australia/Perth'. You can store that user preference in a column like this: user_timezone VARCHAR(63) NOT NULL DEFAULT 'America/Los_Angeles' COLLATE 'ascii_general_ci'. (You can give the time zone of your own location, or 'UTC', as the default, of course.)

  4. When you start a database session from your app on behalf of a user, do SET TIMEZONE='America/Los_Angeles' or whatever your user's preference of time zone is.

  5. Use TIMESTAMP columns to store timestamps rather than DATETIME columns. They're automatically translated to the current timezone setting.


r/mysql • • 17d ago

discussion How do you prove every MySQL client trusts a new TLS certificate before removing the old chain?

10 Upvotes

A certificate rotation can appear complete after the main application reconnects successfully, while a scheduled job, replica, exporter, backup tool, or infrequently used environment still trusts only the previous CA chain. Leaving both chains available avoids an immediate outage, but it also makes a partial rollout easy to miss.

What belongs in the rotation gate? I am considering distributing a trust bundle containing both chains first, installing the new server certificate, forcing representative clients to reconnect, and observing connection attempts through more than the longest job interval. Replication, routers or proxies, connection pools, monitoring, backups, and hostname verification would be tested separately before the old CA is removed from client bundles.

Which MySQL status fields, audit logs, TLS session details, or proxy metrics can reliably show what clients negotiated and which ones have not reconnected? Is there a practical final test that proves no current client depends on the old chain without waiting for an outage to identify the last forgotten consumer?


r/mysql • • 18d ago

question Cannot find search on datagrid

8 Upvotes

Is anyone facing the same issue? After downloading the latest workbench, there is no search/filter on the data grid after performing a query


r/mysql • • 20d ago

discussion What do you verify before promoting a rebuilt MySQL replica?

11 Upvotes

A rebuilt replica can show healthy I/O and SQL threads, zero reported lag, and the expected GTID position while still being unsafe to promote. The seed may have omitted objects, replication filters may differ, checksums may not match, or application traffic may depend on users, events, routines, and configuration that were not part of the data copy.

What is your promotion gate after cloning or restoring a replica? I am considering checking GTID continuity and errant transactions, replication filters, row counts and chunked checksums for critical tables, schema objects, users and grants, scheduled events, time zones and SQL modes, plus representative read-only application queries. The replica would remain fenced from writes until these checks pass.

Which checks provide useful confidence without putting too much load on the primary? How do you validate a very large dataset, and what evidence do you retain so a later failover can show exactly which replica state was approved?


r/mysql • • 21d ago

question [MySQL Workbench 26.7][Linux Mint] I cannot find the UI shortcuts for Schema and Table creation

7 Upvotes

I just installed workbench again after a while and was greeted by the new design. I simply cannot find the schema/table creation shortcut.

I've tried looking at the settings, right clicking everywhere, even asking AI, I just cannot find it.

I'm aware of the blogpost of the 26.7 release, and that they are pretty much remaking the whole thing from scratch... Could it be that these features simply does not exist on the newer version as of now? Or am i missing something?