r/mysql

wrote a bash + vim workflow that pulls youtube video transcripts into buffers and searches them with fzf
▲ 82 r/mysql+3 crossposts

wrote a bash + vim workflow that pulls youtube video transcripts into buffers and searches them with fzf

i work at a devops consultancy and we have about 180 youtube videos. recorded architecture reviews, internal tech talks, client postmortems, vendor integration demos, conference presentations people bookmarked. they're all shared in a markdown file in our wiki which is basically a list of youtube links with dates. useless for finding anything unless you remember exactly when the video was recorded.

i wanted a way to search these videos by what was actually said in them without leaving the terminal. so i built a workflow around vim, bash, and fzf.

the first piece is a bash script that takes a youtube url and pulls the full transcript using transcript api. it saves the transcript as a plain text file named after the video title with the date prepended. one file per video. all the transcripts live in a directory called ~/transcripts.

the second piece is an fzf wrapper script. it runs fzf with --preview against the transcript directory. as you type, fzf fuzzy matches across all transcript files and the preview window shows the matching file with the match highlighted. select a result and it opens the transcript in vim with the cursor on the first match. i bound this to a key in my shell so i can hit ctrl-t and start searching immediately.

the vim side is where it gets useful. each transcript file has a yaml front matter block at the top with the video title, date, speaker, tags, and the youtube url. i wrote a small vim function that reads the url from the front matter and opens it in the browser. so the workflow is: fzf to find the video, vim to read the transcript, one keypress to open the actual youtube video if i need to watch it.

the ingestion script is about 30 lines of bash. curl to call the api, jq to parse the json and extract the transcript text, a few lines to generate the yaml front matter, and tee to write the file. i have a text file with all 180 urls and a for loop that processes them. the whole batch ran in about 4 minutes.

the fzf wrapper is maybe 15 lines. the vim function is 8 lines. the keybinding is one line in my vimrc.

about 180 videos indexed as plain text files. the consultants on my team use it before client calls to search for whether we've discussed a similar architecture before. i use it almost daily to find specific things from recorded tech talks. the nice thing about plain text files is that grep works, ripgrep works, fzf works, vim's built in search works. no special tooling needed beyond what's already on my machine.

the whole thing took an afternoon and i haven't changed anything since.

u/straightedge23 — 9 hours ago
▲ 7 r/mysql

Faster way to import?

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

reddit.com
u/Cerusa827 — 1 day ago
▲ 2 r/mysql

MySQL 8.0 업그레이드

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

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

reddit.com
u/Ok-School132 — 3 days ago
▲ 3 r/mysql

MySQL management with non root OS user.

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..

reddit.com
u/Revolutionary_Use587 — 3 days ago
▲ 10 r/mysql+3 crossposts

Database monitoring utilities

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

Do you guys think something like this is useful? Are there any pitfalls or improvements you think of? Looking to improve the utility.

u/taohz — 4 days ago
▲ 7 r/mysql+1 crossposts

Mysql Innodb cluster with Multi-instance.

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.

reddit.com
u/BugAdministrative357 — 4 days ago
▲ 2 r/mysql+1 crossposts

Installing mySQL on Ubuntu 25.10

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.

reddit.com
u/Sweaty-Wheel1741 — 7 days ago
▲ 0 r/mysql

Mysql deleted my game files

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?

reddit.com
u/matthewkr89 — 7 days ago
▲ 2 r/mysql

incorrect datetime error: 2026-03-29 01:17:06

EDITED: thankfully only happens on local (mac ) and not on server.
thanks to everyone

Mysql 8.4.8

so i have a column which is a timestamp, i was using b/e language to seed test random data and i got an error

SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '2026-03-29 01:17:06' for column 'created_at' at row 1 (Connection: mysql, Host: xx, Port: xxx, Database: xx SQL: insert into `messages` (`inbox_id`, `user_id`, `text`, `is_image`, `seen_at`, `created_at`, `updated_at`) values (33, 22, some text., 0, NULL, 2026-03-29 01:17:06, 2026-05-11 13:10:45))

if i change that datetime to 2026-04-29 01:17:06 OR. 2026-03-29 02:17:06 it works.. as its RANDOM data i havent seen the error before, but just want a solution as it could happen in production

(PS> dont worry about unquoted text/time etc) i have manually adding them and tested in MYSQL and i get same errror)

EDITED to add from some research it seems to be timezone issue. but that to me doesnt make sense because if i enter a datetime of '2026-03-29 02:18:06' it works and in DB i still see 2026-03-29 02:18:06 and not 2026-03-29 01:18:06 if there was a timezone issue?

reddit.com
u/shez19833 — 11 days ago
▲ 4 r/mysql

Why is there so little info on mysql heatwave?

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

reddit.com
u/Truth_Seeker_io — 11 days ago