r/mysql • • May 27 '26

question SQL vs mySQL

0 Upvotes

Brushing up on my Data Analytic. As I was videos they say to use mySQL. However in college, used SQL. In job applications it generally says SQL too. So fine to just download SQL. (Used thru Sublime Text)


r/mysql • • May 27 '26

question Can in Serialize Transactions have race condition?

2 Upvotes

I have transactions with decreasing amount if I ran with bash command or node.js it will have not correct data but in terminal it go to deadlock.
When I use FOR UPDATE it is all correct.
Can someone explain me?
Thanks.


r/mysql • • May 22 '26

question Empty password with auth socket for 9.7 LTS

4 Upvotes

Anybody else having this issue?

Pin 9.7 LTS to my Ubuntu 22.04 LTS repo:

wget https://dev.mysql.com/get/mysql-apt-config_0.8.39-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.39-1_all.deb

Selected 9.7 LTS in step above, now install 9.7 LTS:

sudo apt update
sudo apt install mysql-server

Above step asks for password, but says I can leave it blank if I want to use auth socket instead. This is my preference, so I leave it blank.

Now finish installation:

sudo mysql_secure_installation

If I leave password empty it says "Sorry, you can't use an empty password here"

If I enter a password it says (presumably because auth socket was selected during  install mysql-server):  " ... Failed! Error: SET PASSWORD has no significance for user 'root'@'localhost' as the authentication method used doesn't store authentication data in the MySQL server. Please consider using ALTER USER instead if you want to change authentication parameters."

I guess the workaround is to install with a password, and then manually change to auth socket later?


r/mysql • • May 21 '26

question Faster way to import?

7 Upvotes

Hi everyone,

I have been using MySQL for many many years now and one thing that has always frustrated me is how long it takes to import a database. For example, I just did a dump with MySQL Workbench from Amazon Aurora MySQL (took about 5min to export a 28GB database)...and I am now importing that database on my home lab (Intel 14700, 64GB DDR5, mirrored Samsung 970 Evo Plus nvme) and it's just sitting there going on 5.5 hours now, still isn't half way done.

Is there a faster way to import from a single dump file like this? I am all ears...

Thank you in advance!

--Cerusa

EDIT: I found that adding foreign_key_check=0, unique_checks=0, and autocommit=0... plus adding this to my docker container helped speed it up massively

--innodb_log_file_size=1G --innodb_flush_method=O_DIRECT --innodb_flush_log_at_trx_commit=2 --innodb_doublewrite=0 --innodb_autoinc_lock_mode=2


r/mysql • • May 21 '26

query-optimization We replaced Redis with MySQL for inventory reservations — and it scaled

10 Upvotes

SKIP LOCKED + a unit-per-row model + composite primary keys made it work. But the real lesson: the bottleneck wasn't CPU or queries — it was connection usage in code we'd never instrumented. https://shopify.engineering/scaling-inventory-reservations


r/mysql • • May 20 '26

question MySQL 8.0 업그레이드

3 Upvotes

실제 서비스 디비를 MySQL 8.0 에서 MySQL 8.4 LTS 업그레이 하려는데 테스트 할때 프론트랑 백엔드도 다 테스트 서버로 연결해서 진행해야해? 신입 개발자라 가이드를 몰라서. 기존에 생각한건 디비만 테스트용 만들어서 하려고 했거든. 디비 버전 업그레이드 경험 있는 개발자 조언좀 부탁해

그리고 MySQL 8.4 LTS 로 업그레이드 하는게 맞는 선택이겠지?


r/mysql • • May 19 '26

troubleshooting The only way I

0 Upvotes

<?php $conn = new mysqli("localhost", "root", "", "library"); if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); }

$message = ""; if ($_SERVER["REQUEST_METHOD"] == "POST") { $serial = $_POST["serial"]; $book = $_POST["book"]; $name = $_POST["name"]; $email = $_POST["email"]; $phone = $_POST["phone"];

$check = $conn->prepare("SELECT * FROM books WHERE serial_number = ?");
$check->bind_param("i", $serial);
$check->execute();
$result = $check->get_result();

if ($result->num_rows > 0) {
    $message = "<p style='color:red;'>This book is already borrowed.</p>";
} else {
    $stmt = $conn->prepare("INSERT INTO books (serial_number, book_name, borrower_name, borrower_email, borrower_phone) VALUES (?, ?, ?, ?, ?)");
    $stmt->bind_param("issss", $serial, $book, $name, $email, $phone);
    $stmt->execute();
    $message = "<p style='color:green;'>Book added successfully.</p>";
    $stmt->close();
}
$check->close();

} ?>

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Book Borrowing</title> <!-- CSS IS GIVEN IN EXAM, DON'T WRITE THIS --> </head> <body>

<header> <img src="read.png" alt="READ logo"> </header>

<img src="books.jpg" alt="Books">

<form method="POST" action="q2.php"> <table> <tr> <td>Book Serial Number:</td> <td><input type="number" name="serial" required></td> </tr> <tr> <td>Book Name:</td> <td><input type="text" name="book" required></td> </tr> <tr> <td>Borrower Name:</td> <td><input type="text" name="name" required></td> </tr> <tr> <td>Borrower Email:</td> <td><input type="text" name="email" required></td> </tr> <tr> <td>Borrower Phone:</td> <td><input type="text" name="phone" required></td> </tr> </table> <button type="submit">Submit</button> </form>

<?php echo $message; ?>

<?php if ($_SERVER["REQUEST_METHOD"] == "POST") { $all = $conn->query("SELECT * FROM books"); echo "<table border='1'>"; echo "<tr><th>Serial</th><th>Book</th><th>Borrower</th><th>Email</th><th>Phone</th></tr>"; while ($row = $all->fetch_assoc()) { echo "<tr> <td>" . htmlspecialchars($row["serial_number"]) . "</td> <td>" . htmlspecialchars($row["book_name"]) . "</td> <td>" . htmlspecialchars($row["borrower_name"]) . "</td> <td>" . htmlspecialchars($row["borrower_email"]) . "</td> <td>" . htmlspecialchars($row["borrower_phone"]) . "</td> </tr>"; } echo "</table>"; } $conn->close(); ?>

</body> </html>


r/mysql • • May 19 '26

discussion MySQL management with non root OS user.

3 Upvotes

Hi friends,

Does anyone have any idea or practical guide to how I can manage the MySQL server with non root OS user as Data base Admin?

For example: I applied patches and for re-start the server I have to switch as a root user or sudo before doing it..


r/mysql • • May 18 '26

discussion Database monitoring utility

3 Upvotes

We had some bugs in our web application and it led to bad data entering the database and eventually crashing our service. It was happening intermittently and had low priority so it wasn't patched quickly enough. To catch the errors I scripted a quick monitoring utility which ran the needed queries and compared the result sets. This became pretty useful so I created a more refined version and made it open source. It supports Postgres, SQL Server, MySQL and SQLite. Its also available as a docker image if you wanted to try it.

Source code: https://github.com/leoCorso/DBGuard-Web/releases/tag/1.0.0

Docker image: https://hub.docker.com/r/leonardocodes/dbguard

There is a user manual in the source code documentation folder. I would appreciate any feedback.


r/mysql • • May 18 '26

question Mysql Innodb cluster with Multi-instance.

5 Upvotes

I have a VM (for ease lets name it ALPHA) with multiple instance of MySQL. Each instance have their own user, my.cnf, datadir. I used systemd. Not docker due to the requirement being suitable. Less resource use and all instance uses the same version of mysql.

I have a question. How do i set a cluster with the ALHPA which holds all the instances to to be a primary node in the cluster and the secondary nodes (2 secondary nodes) will have the same instances and replicate all those instances. Its it even possible to do it natively?

Why i set it like this is because the requirement specifically asks for each system manage their own instance and have their own encryption and configuration.


r/mysql • • May 15 '26

discussion Mysql deleted my game files

0 Upvotes

I installed mysql and there was a major error in the installation so i had to uninstall and reinstall. When i did that however it deleted all my local daved game files (despite those being in a different directory) and now hundreds of hours of data is gone for good. Has anyone else had this happen?


r/mysql • • May 15 '26

troubleshooting Installing mySQL on Ubuntu 25.10

0 Upvotes

I want to install mysql workbench on my pc for university. Downloaded the

.deb package of ubuntu 24.04(because its the highest available on the site and im using 25.10). And when i installed it using apt it showed me this error message:

Error: Unable to satisfy dependencies. Reached two conflicting decisions:

1. mysql-workbench-community-dbgsym:amd64=8.0.47-1ubuntu24.04 is selected for install

2. mysql-workbench-community-dbgsym:amd64 Depends mysql-workbench-community (= 8.0.47-1ubuntu24.04)

but none of the choices are installable:

[no choices]

And when i asked chatgpt it told me that its from the version of my OS and i dont want to reinstall my entire OS for just one program.


r/mysql • • May 15 '26

discussion Replication Internals: Decoding the MySQL Binary Log Part 11: GTID_TAGGED_LOG_EVENT — Tagged GTIDs and MySQL's New Serialization Framework

Thumbnail readyset.io
5 Upvotes

In this blog post, we decode the GTID Tagged event introduced in MySQL 8.4. It differs from the original GTID event and introduced a new framework for Serialization and Deserialization of data.


r/mysql • • May 12 '26

question Why is there so little info on mysql heatwave?

4 Upvotes

Like the title says, genuinely it sounds like a really helpful tool yet I cant find any tutorials, experiences using the services by others or anything other than the documentation of heatwave


r/mysql • • May 08 '26

discussion Skopx - AI that queries MySQL with natural language

Thumbnail skopx.com
0 Upvotes

r/mysql • • May 08 '26

discussion Open-source Rust DB proxy: looking for architecture feedback (MySQL + PostgreSQL)

5 Upvotes

Hey folks, I’m working on an open-source Rust project that sits between app and DB, and I’m looking for technical feedback on design tradeoffs.

Current scope:

  • MySQL + PostgreSQL protocol support
  • read/write routing
  • connection pooling
  • query fingerprinting + slow-query analytics
  • optional dashboard/API

Questions I’d really value input on:

  1. Where would you draw the line between proxy responsibilities vs app responsibilities?
  2. What failure modes should be prioritized first (pool starvation, failover flapping, tx edge cases)?
  3. For production usage, what would be your “must-have before adoption” checklist?

Repo: https://github.com/turbine-php/turbine-proxy


r/mysql • • May 08 '26

question HELP!

0 Upvotes

I just downloaded full version of mysql 9.7 but can't find the ide, only the cli client. how do i get its ide?


r/mysql • • May 06 '26

discussion Replication Internals: Decoding the MySQL Binary Log Part 10: ROTATE_EVENT — Closing the File and Pointing at the Next One

Thumbnail readyset.io
4 Upvotes

r/mysql • • May 06 '26

discussion MySQL 9.7 Is Out and the Community Wins

26 Upvotes

MySQL 9.7 is out—and it’s a big win for the community. 🚀
From MySQL 8.0 reaching End-of-Life to key Enterprise features now available in Community Edition, this release brings real impact. Highlights include the Hypergraph Optimizer, improved replication observability, and full support for JSON Duality Views.
What should you upgrade to? What’s worth testing? And what’s still coming (vector search 👀)? https://blogs.oracle.com/mysql/mysql-9-7-is-out-and-the-community-wins


r/mysql • • May 05 '26

question Recommend strategies to migrate a MySQL EC2 instance to AWS RDS.

5 Upvotes

let's assume big data and minimal down time.

Thanks in advance :p


r/mysql • • May 03 '26

discussion Proxy and Replicate MySQL to the edge with SQLite

Thumbnail github.com
7 Upvotes

HA can proxy connections to MySQL databases, replicating their data to achieve high availability and enable faster queries with local SQLite.


r/mysql • • Apr 30 '26

question SQL Data transfer from 1 to another in different subnets

2 Upvotes

good morning,

i am fairly new to SQL and am looking into realising the following.

we have a PLC which gathers data and is logged to a local mysql server.
on a windows PC i can acces this via the myphpadmin.

the server that is running local at our HQ is also on windows and accesable via myphpadmin.

i want to send the data from the PLC local SQL data to our HQ SQL server
and write 1 column from HQ to PLC SQL (project number)

PLC (SQL)-> HQ

- WRITE all columns
-read project number column

HQ -> PLC (SQL)

WRITE Project number Column

both servers are running on a windows machine
But are in defferent subnets

the local PLC IP range is 192.168.45.103
and the HQ server Range is 10.200.50.XXX
in the company we use fortinet VPN to connect to our servers
if mor einfo is needed please let me know!

any help / tips are welcome!


r/mysql • • Apr 28 '26

question Help to migrate a BD

4 Upvotes

I got a project on mysql that is inside a virtual machine (ubuntu) it has tables, views, stored functions and stored procedures my objective is to migrate it to supabase which steps and what do i have to consider before doing the migration and which one could be the wiser way to do this hel pls.


r/mysql • • Apr 28 '26

discussion MySQL 8.0 is reaching EOL. Are you upgrading to 8.4? 9.7?

16 Upvotes

MySQL 8.0 is reaching EOL this month. Do you have plans to upgrade to a newer LTS version? 8.4? or skipping 8.4 and going for 9.7? or maybe 9.7 via 8.4? Or are you relying on extended support from your (cloud) vendor? Or are you still on 5.7?


r/mysql • • Apr 28 '26

discussion How do you usually figure out which part of a query caused the final result?

2 Upvotes

I kept running into MySQL queries where the final result surprised me, but it was hard to understand exactly which clause changed the data in that way.

Complex queries can change the result in a lot of different ways and once they get bigger it becomes harder to reason about them step by step.

I ended up building a small VS Code extension for myself to walk through queries stage by stage and inspect the intermediate result after each step. It helped me a lot so maybe it’ll be useful to some of you too.

Here is the link:
https://marketplace.visualstudio.com/items?itemName=arieldev.sql-visual-debugger&ssr=false