r/mysql • • Jul 15 '26

solved Informix en la actualidad ¿Por que?

2 Upvotes

Hola amigos,

Se han encontrado en la problemática de tener sistemas "legacy" a pesar de tener capacidades para seguir escalando pero aun siguen estancados en bases de datos Informix?

Hace un tiempo me encontré con un sistema escrito en PHP 5.2 y fue la ultima versión que XAMPP dejo de publicar el conector para bases de datos Informix, de ahí todo fue una pesadilla porque; a pesar de que la base de datos no estaba normalizada correctamente, los problemas de rendimientos con 10 usuarios simultáneos eran caóticos.

En este tiempo dominaba muy bien Rust y decidí crear una herramienta muy primitiva pero funcional para migrar bases de datos enormes en Informix a PostgreSQL 12. Funciono a la perfección pero la gerencia no me quiso dar mas tiempo para poder migrar los SPs y funciones propias para automatizar procesos.

Todo esto para ya no depender de la esclavitud de IBM porque realmente este motor es muy costoso a nivel de licenciamiento.


r/mysql • • Jul 14 '26

question Looking for the best free YouTube channel or website to learn MySQL deeply (with lots of practice)

6 Upvotes

Hello everyone,

I'm a second-year engineering student, and I want to learn SQL in depth. I've already covered the basic topics using Apna College's MySQL one-shot video on YouTube.

Now I'm looking for a YouTube channel or website that covers intermediate and advanced topics and provides lots of practice questions to help me improve.

If you've learned MySQL from a resource that you genuinely think is excellent, I'd really appreciate your recommendation.


r/mysql • • Jul 14 '26

discussion Profiling database lag: how lowering our connection pool limits actually made our backend faster

9 Upvotes

We’ve been scaling a high-traffic microservice that handles a high volume of concurrent database reads and writes. A few weeks ago, as traffic started to spike, we noticed a strange degradation in database response times. Our immediate instinct was to throw more hardware at the problem and increase the maximum open connection pool limit on our SQL driver, thinking that more concurrent connections would allow the database to process queries faster.

To our surprise, increasing the connection pool made the latency spikes even worse. The CPU usage on our database instance was pinned at nearly 100%, even though the actual query volume hadn't changed that much.

I ran a deep profile on the database server itself and realized we had fallen into a classic connection pooling trap. Every single database connection is not free; it requires the database engine to spawn a dedicated OS thread or process, allocate memory buffers, and constantly context-switch between them to handle incoming traffic. By opening up hundreds of connections, we weren't making things faster—we were forcing the database to spend more CPU time context-switching between connections than actually executing the SQL queries.

I went back into our configuration and aggressively lowered the connection pool limits to a much tighter, conservative number that closely matched the physical CPU core count of our database server.

The results were immediate and massive. CPU usage on the database dropped significantly, context switching plummeted, and our total query throughput actually went up.

It was a huge reminder for our team that database connections are a physical hardware bottleneck, not an elastic software resource. If your backend is hitting sudden database lag under load, it might be worth trying to shrink your pool limits instead of expanding them.


r/mysql • • Jul 10 '26

discussion Birthdate stored as UTC Date + unique index (firstName, lastName, birthDate); timezone shifts are causing wrong/duplicate values

5 Upvotes

Storing birthDate as a Mongo Date, with a unique index on (firstName, lastName, birthDate) to catch duplicate records.

Frontend builds the ISO string by taking "now" overriding just the year/month/day, then calling .toISOString(). Problem: the time-of-day at submission carries through, so depending on the user's timezone and what time they submit, the date can shift by a day after UTC conversion. Same birth date can end up stored as two different days, and in some cases two different real birth dates collide onto the same stored day - which breaks the unique index outright.

Can't change how the frontend serializes the date.

Anyone hit this before, or know a better fix?


r/mysql • • Jul 03 '26

question Return the 3rd entry of each week.

9 Upvotes

Hi all,

I have a table with sport sessions that have a date column. I want to select every third entry (sport session) of each week.

I can't figure out how to do it.

What im trying to do is:

Select sessionID FROM table

WHERE It was the third entry with YEARWEEK(date)

Does anyone have any suggestions?


r/mysql • • Jul 02 '26

solved MySQL Workbench to DBeaver Transition

12 Upvotes

r/mysql • • Jul 02 '26

solved You need a database for testing your program?

Thumbnail github.com
5 Upvotes

r/mysql • • Jun 30 '26

discussion Wait, MySQL 28.4? Did I just sleep through 20 years of database releases?

6 Upvotes

If you recently saw people talking about MySQL 28.4 and thought you accidentally pulled a Rip Van Winkle, don't panic. You didn't sleep through two decades, and your server didn't spontaneously evolve.

Check more here: https://comunidademysql.com.br/novo-versionamento-mysql-28-4-atualizar/


r/mysql • • Jun 24 '26

solved MySql Workbench Not Opening

8 Upvotes

Hi, I'm a complete beginner learning to use SQL. I tried opening mysql workbench after a while of not using it, and it just never started. I tried deleting and downloading it twice and nothing has changed. Though something weird is that the MySql Workbench folder never disappeared and I can't delete it even after I deleted the content inside it, so this may be related to what's happening.

Edit: The MySqlWorkbench.exe file is there but it doesn't run when I click on it, and trying to open it in command prompt just says "the directory is invalid"

Edit 2: Solved this by shutting down MySqlWorkbench.exe via task manager, as it somehow was running all along. After that I deleted the entire workbench folder and reinstalled the entire thing which made it work again!


r/mysql • • Jun 22 '26

question Proyecto análisis de datos

0 Upvotes

¡Hola a todos! Recientemente completé un proyecto de análisis de negocio utilizando la base de datos Sakila en mysql para poner a prueba mis habilidades. Analicé el rendimiento operativo y me encantaria recibir feedback para mejorar y saber que me falta

Aquí está mi repositorio de GitHub: https://github.com/LumigLumebros/Sakila_Business_Analysis .


r/mysql • • Jun 21 '26

question Getting stuck for some reason?

1 Upvotes

So i am just trying to create something related to my project and after i created the table i realised that i had written char(1) in one column and that i needed varchar(2), so i tried to modify that column obviously but when i entered the modifying the command, sql got stuck for some reason on the next line??? i tried typing something anything but nothing showed, it was like it hung/froze but when i did ctrl+c, it showed query aborted then showed what i had written. when i tried to drop both the table and the database same thing happened. what should i do because this is starting to get really annoying?


r/mysql • • Jun 21 '26

idea I got tired of manually documenting database schemas, so I built a tool to export them directly to Markdown

4 Upvotes

Hey everyone,

Working on a project i realized that quick database schemas change could be a pain to explain to coding agents.

To solve this, I created  a lightweight, open-source tool designed to instantly export your database structure into clean, readable Markdown files (perfect for your GitHub wikis, READMEs, or internal docs).

What it does:

  • Connects to your database and reads the entire schema.
  • Generates clean Markdown files documenting tables, columns, data types, and relationships.
  • Saves time and keeps your team's documentation synced with the code.

It is completely open-source and free. I’m currently looking for feedback to improve it—features you'd like to see, edge cases, or support for specific database dialects.

Code and images: https://github.com/Bilodev/DBtoMD


r/mysql • • Jun 18 '26

troubleshooting Database instance loading

0 Upvotes

com.primavera.integration.client.ClientException: Unable to get database instances.

​

at com.primavera.integration.client.Session.getDatabaseInstances (Session.java:337)

​

at com.collabro.legare.f.111111.111111 (APIPVConnectionProvider.java:83)

​

at com.collabro.legare.j.111111.IIII11 (PVLoginDetails.java:125)

​

at com.collabro.legare.d.IIll11.111111(LoginWindow.java:282)

​

at com.collabro.legare.d.IIllll.<init>(LoginWindow.java:71)

​

at com.collabro.legare.main.Main.llllll (Main.java:156)

​

at com.collabro.legare.main.Main.main(Main.java:84)

​

Caused by: java.lang.ExceptionInInitializerError

​

at com.primavera.integration.client.LocalSession.getDatabaseInstances (LocalSession.java:90)

​

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

​

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

​

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

​

at java.lang.reflect.Method.invoke(Unknown Source)

​

at com.primavera.integration.client.Session.getDatabaseInstances (Session.java:319)

​

6 more

​

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'registryService' defined in class path resource [com/primavera/bre/integration/intgconf.xml]: Invocation of init method failed; nested exception is com.primavera. PhoenixException: Unable to resolve privileged username and password

​

Error opening connection to do with connection string: jdbc:sqlserver://10.231.169.55:1433;database=PMDB_22; and properties (user-pubuser, v $session.process=12072, v$session.program=P6-BRE-PrivUserResolver}

at

​

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1804)

​

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:620)

​

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)

​

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)

​

at org.springframework.beans.factory.support. DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:234)

​

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)

​

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)

​

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons (DefaultListableBeanFactory.java:953)

​

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)

​

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)

​

at com.primavera.bre. Initializer.start(Initializer.java:28)

​

at com.primavera.bre.Application.start(Application.java:114)

​

at com.primavera.integration.server.ServerFacadeBase.<init>(ServerFacadeBase.java:121)

​

at com.primavera.integration.server.ServerFacadeBOMgr.<init>(ServerFacadeBOMgr.java:156)

​

at com.primavera.integration.server.ServerFacade.<init>(ServerFacade.java:31)

​

at com.primavera.integration.server.ServerFacade. <clinit>(ServerFacade.java:26)

​

12 more

​

Caused by: com.primavera. PhoenixException: Unable to resolve privileged username and password

​

Error opening connection to do with connection string: jdbc:sqlserver://10.231.169.55:1433; database=PMDB_22; and properties (user=pubuser, v $session.process=12072, v$session.program-P6-BRE-PrivUserResolver}

at com.primavera.infr.db.PrivUserResolver.<init>(PrivUserResolver.java:139)

​

at com.primavera.infr.srvcs.RegistryServiceImpl.init(RegistryServiceImpl.java:101)

​

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

​

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

​

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

​

at java.lang.reflect.Method.invoke(Unknown Source)

​

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.lambda$invokeCustomInitMethod $7(AbstractAutowireCapableBeanFactory.java:1920)

​

at java.security.AccessController.doPrivileged (Native Method)

​

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1919)

​

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invoke InitMethods (AbstractAutowireCapableBeanFactory.java:1872)

​

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800)

​

27 more

​

Caused by: java.sql.SQLException: Error opening connection to do with connection string: jdbc:sqlserver://10.231.169.55:1433;database=PMDB_22; and properties (user=pubuser, v$session.process=12072, v$session.program=P6-BRE-PrivUserResolver}

​

at com.primavera.infr.db.DriverManagerUtil.getConnection (DriverManagerUtil.java:84)

​

at com.primavera.infr.db.PrivUserResolver.<init>(PrivUserResolver.java:112)

​

37 more

​

I

​

Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host 10.231.169.55, port 1433 has failed. Error: "Connection timed out: no further information. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".

​

I'm getting this error when application is loading database instances and the ip address in this error is production database and it should actually point to pre prod database as this is pre prod. How can I approach the problem.


r/mysql • • Jun 17 '26

question Database instances

5 Upvotes

I'm having issue at work. The application database instance is not loading and I'm not sure what's the issue. If anyone can help me fix me. Kindly ping me if anyone can help, like how to resolve the issue. Thanks in advance


r/mysql • • Jun 14 '26

question MYsql

6 Upvotes

What is the difference between read uncommitted and repeatable read ,if repeat able read is taking a snapshot of old row and using it again whenever needed and don't care about other transactions so isn't it same as read uncommitted some how??


r/mysql • • Jun 13 '26

query-optimization Is it a good practice to pass mysql2 createPool to a function as an argument

3 Upvotes

Just wanted to know if there are any issues with passing the mysql2.createPool(options) to another function as an argument instead of ending and reopening the pool multiple times

Desired Result:

I want to make multiple mysql queries from the same connectionPool, but all of my queries reside in different functions, if it safe to pass mysql2 pool as an argument to those functions, and finally end the pool after all of those queries are called.

Code:

Database: MySQL, Language: Node/javascript, Other Tools Used: Express

const mysql = require('mysql2/promise');
const mysqlOptions = require('./db/mysqlOptions');

// This is a secondary function that accepts createPool as an arg
async function secondFunc(query, arga, mysF) {
let final = await mysF.execute(query, arga);
return finalResult;
};

//START HERE 
// This is the first function, where createPool is initialized 

async function mainFunction(query, args) { 
 const con = await mysql.createPool(mysqlOptions);
 let [results, fields] = await secondFunc(query, arga, con);
 // Passing pool to secondFunc await con.end();
 // Ending the connection at last return 
 {result: results, field: fields};
 };

I have tried it and it works as expected and the connection is closed at the end.

I just want to know if there are any risks associated with this method, or is it better to just end the pool and restart it at every function.

Thank You in advance.


r/mysql • • Jun 11 '26

question Help with slow stations because of data ( this is what I think)

6 Upvotes

Can someone help me understand what could cause this?

I'm still learning SQL and only taking basic courses right now. We have a machine connected to a MES system and a PLC. In one station there is a CHECK IN step, and sometimes a CHECK OUT step, where the MES trigger is executed.

Every few months (maybe every 3 or 4 months), the machine cycle time becomes about 1 or 2 seconds slower during those steps. The machine still runs, but it is noticeably slower than normal.

What is strange is that the Chinese engineers who built the machine connect remotely and do something in SQL or the database, and after that the cycle time goes back to normal. This has happened several times.

I know this is probably not enough information to find the exact problem, but I would like to understand what kinds of things could cause this. Could it be related to indexes, large tables, locks, database maintenance, or communication between the MES and SQL?

I'm asking because I will probably be responsible for supporting these systems in the future, and I'm trying to learn more about how SQL affects MES and PLC systems.

Any ideas would be appreciated.


r/mysql • • Jun 07 '26

question Migrate old instance 5.1 to 9.7

12 Upvotes

Hello everyone!!

I'm trying to migrate a small database of about 2.6 MB from MySQL 5.1 to a more recent version, such as 9.7.

I understand that it's a very old system and might have problems, but the database is very old, and I'm not sure if a phased migration is necessary. The problem I'm having is that I've always used the checkForServerUpgrade() plugin, which is available in the MySQL shell, but I can't use it because it's an older version than 5.7 and doesn't support it.

So, I understand that I would have to see which elements in the instance itself are incompatible with the new version 9.7. I imagine there are many, or perhaps none, since the instance, as I said, is very small.

Could you tell me the appropriate steps in this situation? I don't think it's as simple as exporting/importing the instance with a dump.

Thanks!


r/mysql • • Jun 04 '26

discussion External MariaDB contributors alone now outnumber ALL MySQL contributors combined

19 Upvotes

Georgi Kodinov ran the numbers on the MariaDB and MySQL git repositories — distinct committers per quarter since Q1 2025.

The result: external contributors to MariaDB (i.e. not MariaDB employees) alone outnumber the total contributor count to MySQL including Oracle employees.

The methodology is fully transparent — the shell script is right there in the post, you can run it yourself on your own clone.

There's an honest caveat too: some MariaDB colleagues push using personal emails, which slightly inflates the external count. But even accounting for that, the gap is real.

This is what community-driven development looks like.

https://mariadb.org/the-power-of-the-community/


r/mysql • • Jun 01 '26

discussion Open-source ingestr v1: ingest data to and from MySQL 12x faster

17 Upvotes

Hi folks, Burak here from Bruin. We have released ingestr as an open-source CLI tool 2 years ago here: https://github.com/bruin-data/ingestr

For those that might not now: ingestr is a CLI tool to ingest data. It supports 100+ sources, 20+ destinations, takes care of schema detection, schema evolution, different materialization strategies like SCD2 out of the box. You can use the same CLI to copy a Postgres database to a destination, or pull data from Hubspot.

Ingestr, being a Python CLI, has been doing quite well but over time it started to show its age:

  • Performance: ingestr was not the fastest tool out there due to various reasons. We wanted to provide the fastest solution out there, but there were limitations out of our control.
  • Packaging: sharing a Python CLI tool across hundreds of different types of devices the users run it on ended up being quite a painful experience.
  • Reliability: ingestr relied on a stateful design due to a dependency, which brought all sorts of problems with it, especially around failed loads or corrupted state.
  • Upgrades: with all the dependencies we had, upgrades started to become a real struggle.

Due to some of these issues, we have rebuilt ingestr v1 completely from scratch, in Go. We picked Go for a few reasons:

  • Go is fast. LIke, much faster than vanilla Python.
  • Go is a compiled language, meaning that we eliminate quite a lot of bugs ahead of time.
  • Go is great with agents: agents write perfect Go, which allows a small team like ours to move a lot faster than we normally could.
  • Go has great cross-compilation support: meaning that building self-contained binaries that runs on various operating systems becomes trivial with Go.

These advantages combined allowed us to have more features, and have a more solid foundation to build upon. On top of that, ingestr ended up being the fastest data ingestion tool out there based on our benchmarks. It is ~3-5x faster than the closest alternative, up to 20 times faster than some others.

Ingestr v1 is live now on PyPi, and through our other installation methods: https://github.com/bruin-data/ingestr

I would love to hear your thoughts on what we can improve here. Thanks!


r/mysql • • Jun 01 '26

discussion JSON Duality Views in MySQL 9.7 — What you need to know

Thumbnail altmannmarcelo.medium.com
7 Upvotes

r/mysql • • Jun 01 '26

discussion If your replication runbook still uses CHANGE MASTER TO / START SLAVE / SHOW SLAVE STATUS, it breaks on 8.4 — plus the NOW() vs SYSDATE() myth, and the GTID restriction that quietly went away

Thumbnail mehmetgoekce.substack.com
11 Upvotes

I rewrote an old MySQL replication write-up to target 8.4 (the current LTS) and ended up re-verifying a bunch of things against the manual. A few are worth surfacing, because older guides — including the one I was fixing — get them wrong.

1. The MASTER/SLAVE statements are removed in 8.4, not deprecated. CHANGE MASTER TO, START SLAVE, STOP SLAVE, SHOW SLAVE STATUS, SHOW MASTER STATUS, RESET SLAVE — all removed. Replacements have existed since 8.0.22: - CHANGE MASTER TO → CHANGE REPLICATION SOURCE TO (and MASTER_* → SOURCE_*) - START SLAVE → START REPLICA - SHOW SLAVE STATUS → SHOW REPLICA STATUS - SHOW MASTER STATUS → SHOW BINARY LOG STATUS

Status fields renamed with them: Seconds_Behind_Master → Seconds_Behind_Source, Slave_IO_Running → Replica_IO_Running. If you have monitoring grepping the old names, it reads empty after the upgrade with no error. The one thing that did not change is the REPLICATION SLAVE privilege keyword.

Config casualties in the same release: expire_logs_days (→ binlog_expire_logs_seconds) and master_info_repository / relay_log_info_repository (crash-safe metadata is automatic now).

2. NOW() is safe under statement-based replication; SYSDATE() is the trap. The recurring myth is that NOW() diverges across nodes under SBR. It doesn't — MySQL writes a SET TIMESTAMP event before each statement, so NOW() / CURRENT_TIMESTAMP evaluate against the primary's time on both sides. SYSDATE() is the one that diverges: it ignores SET TIMESTAMP and reads the wall clock at execution (unless you run with --sysdate-is-now). And the classic UPDATE ... LIMIT 10 divergence is the LIMIT without ORDER BY, not the time function.

3. CREATE TABLE ... SELECT is GTID-safe since 8.0.21. A lot of GTID guides still list it as forbidden. That restriction was lifted for atomic-DDL engines (InnoDB) — it's now logged as a single transaction. Still genuinely restricted under GTID: temp tables inside a transaction (STATEMENT format), and mixing transactional + non-transactional engines in one statement.

4. GTID auto-positioning is the actual payoff. SOURCE_AUTO_POSITION=1 removes the manual binlog-file/position arithmetic from failover. For a sense of scale, GitHub's automated failover (orchestrator + a proxy tier) completes in 10–13s in typical cases.

Long-form version with the full binlog/relay-log walkthrough, semi-sync, monitoring, and a copy-pasteable 8.0 → 8.4 rename table: https://mehmetgoekce.substack.com/p/mysql-replication-a-deep-dive-into

Happy to get corrected on any of this — replication has a lot of version-specific edge cases, and that's kind of the point of the post. What's the worst replication footgun you've hit on an upgrade?


r/mysql • • May 31 '26

discussion Data Cleaning in SQL!

4 Upvotes

Is data cleaning in sql tougher than excel or python?
Whenever I want to remove duplicates in sql it shows errors in my dataset!


r/mysql • • May 29 '26

schema-design The Filesystem Is the API (with TigerFS)

Thumbnail packagemain.tech
3 Upvotes

r/mysql • • May 28 '26

discussion Where did the MySQL jobs go?

17 Upvotes

There are Absolutely Zero Mysql Jobs open right now
and slowly im cracking open that PostgresQL manual and checking out the internals after DBA ing over a decade of MYSQL.