r/mysql • u/BallFun5941 • 1h ago
question MySQL workbench
Why the latest version 26.10.0 of Workbench seems to be so lite version that many functions on the interface are either disappeared or greyed and disabled?
r/mysql • u/jericon • Nov 03 '20
Hello,
I have made a few changes to the configuration of /r/mysql in order to try to increase the quality of posts.
Two new rules have been added
If you see low quality posts, such as posts that do not have enough information to assist, please comment to the OP asking for more information. Also, feel free to report any posts that you feel do not belong here or do not contain enough information so that the Moderation team can take appropriate action.
In addition to these changes, I will be working on some automod rules that will assist users in flairing their posts appropriately, asking for more information and changing the flair on posts that have been solved.
If you have any further feedback or ideas, please feel free to comment here or send a modmail.
Thanks,
/r/mysql Moderation Team
r/mysql • u/BallFun5941 • 1h ago
Why the latest version 26.10.0 of Workbench seems to be so lite version that many functions on the interface are either disappeared or greyed and disabled?
r/mysql • u/Flimsy_Swan5930 • 10h ago
Is there any idea if ORACLE will create a new TIMESTAMP64 type that we can convert our existing TIMESTAMP fields to in a future update? Or should I convert to date time/bigint ?
r/mysql • u/Fun_Disaster_5965 • 12h ago
Hi everyone 👋,
I’m encountering an interesting deadlock issue in MySQL InnoDB involving two concurrent transactions attempting to insert records with different unique IDs that fall within the same index gap.
Both transactions execute the following query simultaneously in separate sessions/processes:
INSERT INTO tbl ()
SELECT ...
FROM DUAL
WHERE NOT EXISTS (
SELECT 1
FROM tbl FORCE INDEX (id_void_idx)
WHERE column1 = %(id)s
AND isvoid = 0
);
What I’m observing:
Both transactions perform the NOT EXISTS check concurrently.
The two IDs are different but fall within the same index range.
Both transactions acquire shared gap locks on the same index gap.
When they proceed with the insert, they encounter a deadlock.
My questions:
What’s the recommended way to prevent this type of deadlock while maintaining the NOT EXISTS check for duplicate prevention?
I’d appreciate any insights into the underlying locking mechanism and recommendations for handling this safely under high concurrency.
Thanks!
r/mysql • u/SuddenlyCaralho • 2d ago
We have some old mysql 5.7 and we are upgrading to 9.7. The upgrade itself is fast (we are upgrating using yum upgrade). It takes about 40 minutes to upgrade 5.7 > 8.0 > 8.4 > 9.7.
But after upgrating to 9.7, we need to convert from utf8 to utf8mb4 (bacause utf8/utf8mb3 is deprecated). But it take many hours, last time it take 9 hours...
So, is there any better way to convert it? The database is almost 1TB.
I am using the following script to generate the convert commands
SELECT
CONCAT(
'ALTER TABLE `', TABLE_SCHEMA, '`.`', TABLE_NAME,
'` CONVERT TO CHARACTER SET utf8mb4 COLLATE ', replace(CCSA.COLLATION_NAME,'utf8mb3','utf8mb4'), ';'
) AS alter_statement
FROM information_schema.TABLES T
JOIN information_schema.COLLATION_CHARACTER_SET_APPLICABILITY CCSA
ON T.TABLE_COLLATION = CCSA.COLLATION_NAME
WHERE CCSA.character_set_name = 'utf8mb3'
AND TABLE_SCHEMA NOT IN ('information_schema', 'mysql', 'performance_schema', 'sys');Oracle yesterday released MySQL 8.4.13.1 which fixes following Critical Security Vulnerabilities.
Fedora Packages are getting and pushed to testing.
https://packages.fedoraproject.org/pkgs/mysql8.4/mysql-server/
r/mysql • u/Vyrio_1526 • 4d ago
Bonjour à tous, je suis étudiant en L2 en administration systèmes et réseaux, je suis en stage dans une entreprise et mon rôle consiste à déployer une application web pour qu'elle soit accessible depuis internet or j'ai un problème concernant les données sur mysql vu que le port 3306 est ouvert. Je suis encore un débutant dans le domaine, mais est ce que l'un de vous pourrait me dire la meilleur chose à faire pour que les données personnelles des agents de l'entreprise ne soit exposées. J'ai envisagé le passage par tunnel ssh mais est ce une bonne idée.
NB: La fermeture du port n'est pas possible car on me demande de trouver une autre solution
r/mysql • u/chinmayvenkat • 10d ago
One of the most common points of confusion in system design is treating database partitioning and database sharding as interchangeable terms (2:04). While they both split up large datasets (0:24), they solve completely different bottlenecks (29:43).
I just put together a 30-minute visual breakdown walking through how both work in production—comparing single-instance MySQL partitioning against distributed sharding in Apache Cassandra (0:39).
Watch the full video here: https://youtu.be/vzBiwOIGTJY?si=khTfg17ajGUejBbj
If you prefer reading, here is a quick summary of what’s covered in the video:
• Partitioning (In-Server): Dividing one massive warehouse into smaller sections (e.g., Jan, Feb, March packages) (2:31). Everything still lives in the same building (a single database instance), and your app queries it as one logical table (2:41).
• Sharding (Multi-Node): Building multiple warehouses in different locations (13:48). Data and compute workloads are horizontally distributed across completely independent servers (14:47).
2. MySQL Partitioning & Common Traps
• Why do it? Partition pruning (skipping irrelevant partitions during queries), instant maintenance (DROP PARTITION instead of slow DELETE queries on millions of rows), and data organization (3:36).
• The Strategies: Range (e.g., by order year), List (e.g., by country), Hash/Key (modulo distribution), and Composite Subpartitioning (4:25).
• Two Traps to Watch Out For:
1. The Primary Key Trap: Every column in your MySQL partitioning expression must be included in every unique key (including the Primary Key) (11:09).
2. Broken Pruning: If you partition an orders table by order_date, querying by customer_name forces MySQL to scan across partitions anyway (12:30).3. Apache Cassandra & Distributed Sharding
• Masterless Ring: Cassandra uses a peer-to-peer ring architecture with tunable consistency rather than a single primary bottleneck (15:22).
• Data Distribution: A Partition Key (hashed via Murmur3) decides which node/token range stores the data, while a Clustering Column sorts rows within that partition (16:57).
• Query-First Design: Unlike relational databases where you normalize first, Cassandra forces you to model tables around exact access patterns—otherwise you hit the dreaded ALLOW FILTERING full-cluster scan trap (20:48).
4. The Reality Check
Crossing 1 million users doesn't automatically mean you need sharding (28:51). Sharding introduces massive complexity: cross-shard scatter-gather queries, live data rebalancing, global ID generation, and distributed transactions (23:02). Always measure your actual bottleneck first—often, proper indexing, caching, read replicas, or MySQL partitioning will take you much further with far less operational overhead (1:13)
r/mysql • u/matcha_tapioca • 10d ago
Hi! I don't really have much knowledge in queries or mySql in general but I have used it before..
I redownload it today and pretty much confused with the new UI.
the tool bar is gone, and seems like the only option to create a database/schema is by executing a sql command.. I even tried to right click below the schema option and nothing appears.. however, if I right click on the existing schema it just display an option to set it as default schema.
or is there a way to enable it again? right now I have no choice but to copy paste a sql command I searched or asked with AI to get the job done.
thank you.
r/mysql • u/DesignerDetective518 • 14d ago
Hey everyone,
I'm about to take a few days off to flush some data from memory to disk and recharge, but before heading out I wanted to share a major update to myflames.
What started as a simple query execution plan visualizer has evolved—after a lot of testing and cycles—into a unified hub to investigate and manage database health.
It supports MySQL and MariaDB, along with surrounding ecosystem pieces like Readyset and ProxySQL. Some of the stuff you can do right inside it now:
You can check it out here:https://myflames.io/
I’d love to hear what you think! If there are specific diagnostic checks or pain points in your daily MySQL/MariaDB workflow you’d like to see added when I’m back.
r/mysql • u/dirtcreature • 16d ago
What a waste of 2 hours.
Create SSH tunnel.
Copy/paste usernames and IP addresses from our password storage system.
Cannot connect
Connection Error: Error opening MySQL session through SSH tunnel: Lost connection to MySQL server at 'reading initial communication packet', system error: 0. Workbench.
Check everything on the server three times. What is going on?
Turns out that there is zero input sanitization on the username/ip fields and so Workbench is sending the escaped spaces!
myusername = unername%20
192.168.1.100 = 192.168.1.100%20%20r/mysql • u/KingBig9811 • 17d ago
I've been spending some time investigating slow MySQL queries in production recently. Thought I'd put together some notes on the approach I followed and a few things I found useful along the way.
My general approach is to get as much as possible out of the existing database before considering additional replicas, sharding or other infrastructure changes.
A few things I usually look at:
I also cover a few examples and explain how I approach reading execution plans.
Put together a write-up with the process and some SQL examples here: https://koul1sh.github.io/posts/getting-more-out-of-your-mysql-instance/
Would be interested in hearing how others approach database performance investigations, particularly in production environments. Anything you'd do differently?
r/mysql • u/MatterDecent9033 • 17d ago
I've been chasing a slow query pattern on a multi-tenant schema (MySQL 8.4). It comes down to index merge intersection, and I'm curious how others handle it.
Simplified shape:
(
id BIGINT PRIMARY KEY AUTO_INCREMENT,
account_id BIGINT NOT NULL,
person_id BIGINT NOT NULL,
KEY index_assignments_on_account_id (account_id),
KEY index_assignments_on_person_id (person_id)
);
SELECT * FROM assignments WHERE account_id = ? AND person_id = ?;
The optimizer sometimes picks an index_merge intersect of both indexes instead of just the person_id lookup. It assumes the columns are independent, underestimates the overlap, and ends up reading the whole tenant through the account_id index.
What I tried:
So the composite looks like the real fix. That raises the broader question: is it standard practice to lead every secondary index with the tenant id?
Some things I'm unsure about:
Would love to hear from anyone running large multi-tenant schemas on MySQL.
r/mysql • u/Master-Bass-1905 • 21d ago
Readyset is a query cache for MySQL and Postgres. It now has support for automatic failover and multi-server support. Basically it means that if the server that it’s shadowing fails over, the cache will automatically adjust and work post-failover. It’s a pretty interesting technical solution, and one I thought this audience might appreciate. You can read more here.
https://readyset.io/blog/introducing-automatic-failover-and-multi-server-support
r/mysql • u/huseyinbabal • 21d ago
I benchmarked PostgreSQL and MySQL with same scenarios by using k6 in real server. Really would like to discuss results
r/mysql • u/Narrow_Inevitable586 • 21d ago
We're currently running a single primary MySQL node, which we recognize as a single point of failure (SPOF). To address this, we're considering introducing a read replica.
However, read replication comes with its own set of challenges, such as read-after-write consistency, replication lag, deciding which queries should go to the primary versus the replica, and handling failover.
For those who have implemented this in production, how have you approached and solved these challenges?
r/mysql • u/NeblinaPerdido • 23d ago
Most "best MySQL GUI" lists rank tools by how many features they have. That doesn't help much, because the right tool depends on what you do all day. Running a few queries against a dev database is a different job from maintaining a dozen schemas or building weekly reports.
Here's a quick comparison of the tools that come up most often, with the trade-offs people usually run into.
| Tool | Price | OS | Good at | Where it gets thin |
|---|---|---|---|---|
| MySQL Workbench | Free | Windows, macOS, Linux | Official tool. Visual data modeling, server admin, migration wizard | Less focus on comparison reports, test data and automation |
| HeidiSQL | Free, open source | Windows | Fast and light. Quick data editing, also connects to SQL Server and PostgreSQL | No visual modeling or schema compare |
| phpMyAdmin | Free, open source | Browser | Access from anywhere, often already installed on hosting | Not built for heavy development work |
| DBeaver | Community free, paid editions | Windows, macOS, Linux | One client for many databases | Same UI for every engine, some features only in paid editions |
| dbForge Studio for MySQL | Free Express edition, paid editions | Windows (Linux and macOS via CrossOver) | MySQL and MariaDB depth: code completion, Query Profiler, schema and data compare with sync scripts, test data, reports, CLI automation | Windows-native. Covers MySQL and MariaDB and their cloud services only, other engines are covered in dbForge Edge |
| Navicat for MySQL | Paid | Windows, macOS, Linux | Mature UI, data transfer and sync, modeling | Commercial license only |
How to narrow it down
If you mostly run queries and edit rows, any of the free options will do. Workbench if you want the official tool and modeling, phpMyAdmin if you're on a browser and don’t want to install anything on your desktop.
If you look after several environments, check two things: does the tool generate a sync script you can review before running it, and can it do that from the command line. That's usually where free clients and paid IDEs split.
If you need MySQL plus other RDBMS support in one app, a multi-database client like DBeaver makes more sense than separate focused tool.
dbForge Studio for MySQL has a 30-day trial of the Enterprise edition, then switches to the free Express edition, so you can try it on your own databases first.
What are you using now, and what's the one thing you wish it did better?
r/mysql • u/TomFighter • 24d ago
I am learning about databases and need to install MySQL on my Mac. I installed the MySQL Community edition using the DMG file, but it isn't running in the terminal; when I enter the command "mysql -u root -p," I get the following error message: "ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)." Note: At no point during the installation was I asked to create a password, which contradicts what I saw in the tutorial.
r/mysql • u/drrtuy-b • 27d ago
Couple years ago Marko decided to remove a partioned LRU cache from MariaDB(it is still used in MySQL code). There was a lot of doubt regarding this but his solution worked as good as a previous one for most of microbenchmarks except one. However at the time of the transition this performance regression had not been noticed. In March 2025 Mark Callaghan demonstrated the regression that has been introduced in 10.5. However his statistical results contained an interesting outlier for 10.8.8 that was on par with 10.4 and 3x faster than any version after 10.5. Alessandro Vetere was able to find out an offending mutex that syncs B-tree read operations running the microbenchmark reclaiming the lost performance.
This story raises a question whether the approach with non-partitioned LRU cache in MariaDB makes sense or the old partitioned version is better? WDYT?
I have a MySQL database stored only in a local instance made with MySQL Workbench. I would like to export the data to have backups until I can get this properly set up in a server-hosted database. My problem is that any special characters seem to get messed up when doing an export. If I export a whole table into a CSV or JSON, accented or non-English characters get turned into unicode escape chars, and if I try to export the results of a query to CSV it gets messed up in a different way. The database is about Pokemon, and the word "Pokémon" either becomes "Pok\u00e9mon" or "Pokémon". It shows up normally within Workbench, though. I know this has something to do with character encoding but I don't really understand that. The "Charset/Collation" setting on the relevant column is set to Default Charset, but I changed it to UTF-8 and had the same issue.
What do I need to do here?
r/mysql • u/Proof_Independent877 • Oct 29 '26
I just download sql workbench and I tried to make a connection but it keeps showing Connection error. I think it might be bc of my connection ip. It is set at “localhost” by default. I have tried searching it up but I can’t really understand them. Can anyone give me a detailed guide?
r/mysql • u/diagraphic • Oct 28 '26
Title states the question, I'm curious do share your experiences.
r/mysql • u/busters1 • Oct 27 '26
Hi r/mysql, I'm David, one of the two developers of Oxynote. My friend Simon and I also maintain ttlcache, a Go caching library with about 1,300 GitHub stars, so this isn't our first open-source project.
I've spent 8 years writing software, 2 of them as an SRE and 3 as a team lead. Every team I've been on had the same documentation problem. The useful stuff lived in someone's head or a private Slack thread, and the wiki was full of stale docs nobody could find.
So we set out to solve this problem by building Oxynote, a self-hosted wiki for engineering teams where a page can hold a live chart that runs its own SQL query against your database each time someone opens it, with the explanation written right next to it. Think "signups per day" or "queue depth" on the same page as the runbook that says what to do when it looks wrong.
We were most careful about letting a wiki query a production database. When you add a connection, Oxynote accepts the user only if every grant is read-only. Otherwise, the connection test fails with "has write access" and asks for a read-only user. Queries also support Grafana-style macros like `$__timeFilter` and `$__timeGroup`, and on pages you mark as reviewable, chart query changes go through a draft and a diff that a teammate approves.
The name comes from oxygen + note: docs that breathe. Live data gives people a reason to open the wiki every day, and docs people open every day stay up to date.
It's Apache-2.0 and runs as a single Docker image: https://github.com/oxynote/oxynote
We started it about a year ago, and we made it public about 3 months ago. If you have any questions, feedback, or suggestions, feel free to reach out. I'm happy to answer any questions.
r/mysql • u/Mindless-Piece-47 • Oct 27 '26
This article by Simona Aleksandrova does an excellent job explaining why that matters and how the work fits into the broader open‑source ecosystem.
I’m honored to have been interviewed, and she told the story with real clarity.
https://mariadb.org/the-man-who-benchmarks-mariadb-against-the-world/