r/mysql

▲ 0 r/mysql

How do i grasp Concepts in SQL easily?

I'm struggling to understand the concepts of sql badly, i mean which framework i mean POV is best for grasping? Could you guys share your thoughts. I want to grasp, so that i can tell to the people like 5 years old kid, non tech persons.

reddit.com
u/ParticularBet5580 — 1 day ago
▲ 6 r/mysql

What actually makes you switch MySQL clients?

I keep seeing people complain about Workbench, DBeaver, TablePlus, etc. but still use the same client for years 😅

For people working with MySQL regularly, what would actually make you switch?

Speed? Better tabs/workspaces? Safer production workflows? Better autocomplete? AI that helps with SQL? Something else?

I’m building a database client myself, so I’m genuinely curious what the real deal-breakers are.

reddit.com
u/Still-Trainer-7395 — 3 days ago
▲ 5 r/mysql

Indexing on DB?

Hi people, I haven’t done this before. But are there any downsides of indexing a column on production. Like some query is running very slow, and I figured out that u should put an index on one of the columns. I wouldn’t be here if I had someone experienced to ask from. I’ve a few questions-

  1. Is it okay to run the query on my sql workbench to add index?
  2. If something goes wrong what do you people generally do, like taking snapshots or

PITR

  1. ?
  2. Is it safe to run the query directly on the db or usually people run it some other way, like via cli on VM?
  3. I heard about locking and stuff. But the version I’m using says it won’t lock the DB. But still anything I should test before actually you know doing it live?

I’ve no idea what’s the general procedure and what could go wrong. If someone has done it before, Appreciate any sort of advice or pointers. Thanks

reddit.com
u/yorusora_ — 5 days ago
▲ 15 r/mysql

More fun with moving MyISAM to InnoDB (just so you can laugh at my pain)

If there's anybody that will appreciate this drama, it's y'all!

Quick backstory, I build this database sometime around 2004. It was all MyISAM until I added a couple of InnoDB tables around 2018-19. Then in 2021 I had a MAJOR crash that was related to InnoDB, so I put it all back to MyISAM and had to set `innodb_force_recovery=5` to get it back online.

Now I'm setting up a new server, and I'm altering it all to InnoDB while holding my breath and praying.

So early this morning (1am-ish) I was working on a table and created a FULLTEXT index, which threw an error. I altered it to InnoDB again to make sure there were no errors, optimized, etc, before realizing that the default /tmp/ directory was too small. So I set a new `tmpdir` in my.cnf and the new index built.

But then I saw that the old MyISAM table had 507,000 rows, while the live one only had 467,000! Somehow I'd lost 40,000 rows :-O

I went through EVERYTHING, even down to restoring full database backups. Nope, still missing.

THREE HOURS of late-night panic coding until it hits me... in phpMyAdmin, that `Showing rows 0 - 24 (467000 total...)` isn't accurate in InnoDB! So I do a simple `SELECT *...`, and... yep, it's all good. Same number of rows after all.

So there I am, almost 5am, heart racing, and it turns out that it was right all along.

reddit.com
u/csdude5 — 4 days ago
▲ 6 r/mysql

phpMyAdmin Access Denied

mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it

Can anyone help me? I am doing a project and encountered this problem, I have tried some tutorials but nothing worked. Thank you so much for the help

reddit.com
u/ShallotTerrible1963 — 4 days ago
▲ 0 r/mysql

Foreign keys, yay or nay?

By today's standards, is there a value to using foreign keys beyond a safety net against developer error?

I have over 100 tables, and every site feature relies on joining 2 or more tables and matching up IDs. I'm debating on whether there's any benefit to creating foreign keys when the scripts are already developed and the only person that can ever touch them is me.

* CLARIFICATION: the only person that can touch the code and backend is me.

reddit.com
u/csdude5 — 6 days ago
▲ 0 r/mysql

Missing MySQL on Mac's Settings

Why i cant see on Mac's settings the mysql at the bottom? But running fine on the terminal.

reddit.com
u/WiseGuy008 — 6 days ago
▲ 7 r/mysql

MySQL / Mariadb routine debugger

Hi all,

I’ve released an open-source stored-routine debugger for MySQL and MariaDB, with standalone, VS Code, and NetBeans frontends. It features standard debugging controls like breakpoints, stepping in/out, watches ec...

I’m looking for testers across different MySQL/MariaDB versions and routine styles. Feedback and compatibility reports are very welcome.

Github : https://github.com/rk22-projects/mysql-routine-debugger

VS Code marketplace : https://marketplace.visualstudio.com/items?itemName=RK22.mysql-routine-debugger

rk22

reddit.com
u/rk22_sf — 8 days ago
▲ 10 r/mysql

Why doesn't MySQL have a median function?

I was a bit surprised that MySQL Workbench has no built-in median function similar to AVG, SUM etc. The current way to get the median is to write a fairly lengthy query (compared to simply using the aggragate functions), is there a particular reason why it hasn't been implemented?

reddit.com
u/pancakepizza2 — 8 days ago
▲ 2 r/mysql

When to use InnoDB vs MyISAM (or other)

In the beginning, I understood that InnoDB should be used on tables with a high number of inserts and relatively fewer selects.

Now Claude is telling me that this is essentially backwards.

And Google AI is telling me that MyISAM is more or less legacy and that pretty much EVERYTHING should be InnoDB now. The only exception (according to Google AI) is when you need to use COUNT(*) with no WHERE, in which case MyISAM is faster.

So what's the rule these days?

reddit.com
u/csdude5 — 11 days ago