Skip to content

Commit 31cf08e

Browse files
Mazizovaclaude
andauthored
Add 4 resources: mysql2, PyMySQL, mysqldef (sqldef), mysql_random_data_load (#98)
- mysql2 — fast pure-JS MySQL client for Node.js (Connectors & Drivers) - PyMySQL — pure-Python MySQL/MariaDB client, PEP 249 (Connectors & Drivers) - mysqldef (sqldef) — idempotent schema management for MySQL/MariaDB/TiDB (Schema Management & Migration) - mysql_random_data_load — Percona Lab's random test-data generator (Testing & Benchmarking) Claude-Session: https://claude.ai/code/session_01J9birbhQoGfe39k9wWLiTV Co-authored-by: Claude <noreply@anthropic.com>
1 parent 31fd00e commit 31cf08e

6 files changed

Lines changed: 71 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: "mysql_random_data_load"
3+
link: "https://github.com/Percona-Lab/mysql_random_data_load"
4+
github: "Percona-Lab/mysql_random_data_load"
5+
description: "A command-line tool from Percona Lab that reads a MySQL table's structure and fills it with random rows — for reproducing bugs, seeding test environments, and generating data to benchmark against."
6+
subcategories:
7+
- Testing & Benchmarking
8+
compatibility:
9+
- MySQL
10+
deployment:
11+
- Self-Hosted
12+
pricing:
13+
- Open Source
14+
images:
15+
- logo.png
16+
---
17+
18+
mysql_random_data_load inspects an existing table's column definitions and generates matching random rows — integers, floats, decimals, dates and times, text, blobs, enums, and sets — rather than requiring a hand-written data model. Strings are drawn from random first names, full names, or lorem ipsum text depending on column size, nullable columns get roughly 10% NULLs, and foreign-key columns are populated by sampling real values already present in the referenced table, so generated rows satisfy existing constraints instead of failing on insert.
19+
20+
It's run as `mysql_random_data_load <database> <table> <rows> [options]`, with flags to control bulk-insert batch size, connection details, retry behavior for duplicate keys, and a print-only mode that writes the generated `INSERT` statements to stdout instead of running them. It ships as precompiled Linux and macOS binaries from the project's GitHub Releases. The project is maintained under Percona Lab, Percona's incubator organization for experimental and community tools, and released under the Apache License 2.0. Its own README describes it as an early-stage project that doesn't yet cover every MySQL column type.
2.75 KB
Loading
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: "mysql2"
3+
link: "https://github.com/sidorares/node-mysql2"
4+
description: "A fast, pure-JavaScript MySQL client for Node.js, built as a near-drop-in replacement for the original `mysql` package with a rewritten wire-protocol parser and support for prepared statements, compression, and the binary log protocol."
5+
subcategories:
6+
- Connectors & Drivers
7+
compatibility:
8+
- MySQL
9+
pricing:
10+
- Open Source
11+
---
12+
13+
mysql2 began as a continuation of the original Node.js `mysql` driver, with its protocol parser rewritten from scratch for better performance, while keeping an API close enough to the classic package that most applications can switch over with minimal changes. It adds features the original never gained, including prepared statements, a promise-based API alongside the callback one, support for the MySQL binary log replication protocol, and the ability to act as a MySQL server for testing or proxying.
14+
15+
Other features include support for non-UTF-8 encodings and extended collation handling, connection pooling, SSL and the newer authentication-switching flows, protocol-level compression, and configurable cursor classes. It has no native bindings, so it installs and runs the same way on Linux, macOS, and Windows. The project is released under the MIT License and is one of the most widely used MySQL clients in the Node.js ecosystem.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: "mysqldef (sqldef)"
3+
link: "https://github.com/sqldef/sqldef"
4+
github: "sqldef/sqldef"
5+
description: "An idempotent schema management tool for MySQL, MariaDB, and TiDB — describe the desired schema as plain SQL and sqldef diffs it against the live database, generating and applying only the DDL needed to converge."
6+
subcategories:
7+
- Schema Management & Migration
8+
compatibility:
9+
- MySQL
10+
- MariaDB
11+
- TiDB
12+
pricing:
13+
- Open Source
14+
images:
15+
- logo.png
16+
---
17+
18+
sqldef inverts the usual migration-file workflow: instead of accumulating a sequence of up/down migration scripts, you maintain a single SQL file describing the schema as it should look. Running `mysqldef` compares that file against the live database and generates (and, with `--apply`, runs) exactly the `CREATE TABLE`, `ALTER TABLE`, and index statements needed to get there — whatever the database's starting state. Because the operation is idempotent, running it again against an already-converged database is a no-op, which makes it safe to wire into deploy pipelines. An `@renamed` annotation lets a table, column, index, or ENUM value rename be expressed explicitly, so sqldef doesn't mistake a rename for a drop-and-add.
19+
20+
`mysqldef` is the MySQL, MariaDB, and TiDB variant of the broader sqldef project, which also ships `psqldef` (PostgreSQL), `sqlite3def` (SQLite3), and `mssqldef` (SQL Server) as separate binaries sharing the same approach — an idea originally inspired by Ridgepole's Ruby-DSL-based schema management, reworked around plain SQL instead. It also supports an offline mode that diffs two SQL files directly without a database connection, useful for CI validation, plus `--export` and `--dry-run` workflows. The project is released under the MIT License, with its SQL parser component under the Apache License 2.0.
30 KB
Loading
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: "PyMySQL"
3+
link: "https://github.com/PyMySQL/PyMySQL"
4+
description: "A pure-Python MySQL and MariaDB client library implementing the Python Database API (PEP 249) — no C extension, no `libmysqlclient`, just Python."
5+
subcategories:
6+
- Connectors & Drivers
7+
compatibility:
8+
- MySQL
9+
- MariaDB
10+
pricing:
11+
- Open Source
12+
---
13+
14+
PyMySQL is a pure-Python implementation of the MySQL client protocol, built against PEP 249 (the Python Database API Specification) so it works as a standard DB-API connector: connections and cursors, parameterized queries that keep values separate from SQL text, configurable cursor classes such as one that returns rows as dictionaries, and explicit transaction control since connections default to autocommit off. Because it's pure Python with no compiled extension, it installs anywhere CPython runs, including CPython 3.9 and later and the latest PyPy 3.x releases, without needing MySQL's native client libraries or a build toolchain.
15+
16+
It targets MySQL and MariaDB LTS releases, with optional installable extras adding support for newer authentication methods — `rsa` for MySQL's `sha256_password` and `caching_sha2_password`, and `ed25519` for MariaDB's ed25519 authentication plugin. The project is released under the MIT License and remains actively maintained, with its most recent release (1.2.3) shipping in September 2026.

0 commit comments

Comments
 (0)