PHPackages                             ecomdev/mysql-to-jsonl - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. ecomdev/mysql-to-jsonl

ActiveLibrary[Database &amp; ORM](/categories/database)

ecomdev/mysql-to-jsonl
======================

Export/Import JSONL files as data for MySQL tables

1.4.5(1y ago)2902MITPHPPHP ~8.2CI passing

Since Jan 22Pushed 1y ago1 watchersCompare

[ Source](https://github.com/EcomDev/mysql-to-jsonl)[ Packagist](https://packagist.org/packages/ecomdev/mysql-to-jsonl)[ RSS](/packages/ecomdev-mysql-to-jsonl/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (9)Versions (10)Used By (0)

🚀 Blazingly fast **mysql2jsonl** 🚀
==================================

[](#-blazingly-fast-mysql2jsonl-)

Purpose:
--------

[](#purpose)

The `mysql2jsonl` tool provides an efficient way to export data from a MySQL database to JSONL (JSON Lines) files and to import data back into a database from these files. It is highly configurable and optimized for performance with concurrency and batching in mind!

**Key Features**:
-----------------

[](#key-features)

- Export and Import Commands

    - `mysql2jsonl export`: Exports MySQL database table data into JSONL files.
    - `mysql2jsonl import`: Imports JSONL files back into the MySQL database tables.
- Complex rules for excluding/including tables into the export
- No compromise on performance!
- JSONSchema for configuration validation, no more guessing when editing config file.

Configuration file example
--------------------------

[](#configuration-file-example)

If you want to export / import data from mysql server reachable via `db` hostname and exclude tables that match indexation patterns, you configuration file will look like this:

```
{
  "$schema": "https://raw.githubusercontent.com/EcomDev/mysql-to-jsonl/main/schema.json",
  "config": {
    "connection": {
      "host": "db",
      "database": "magento",
      "user": "magento",
      "password": "magento"
    },
    "excludeTables": [
      {
        "endsWith": "_cl"
      },
      {
        "contains": "_tmp_"
      },
      {
        "contains": "_index_"
      },
      {
        "endsWith": "_index"
      },
      {
        "endsWith": "_replica"
      },
      {
        "regexp": "/^inventory_stock_\\d+$/"
      }
    ],
    "concurrency": 12
  }
}
```

Notice the `$schema` in as the first element? Specifying it like this in your config files allows your favorite IDE's to auto-complete and validate configuration properties.

Installation
------------

[](#installation)

### Phar (Recommended)

[](#phar-recommended)

Download pre-bundled application from [Releases](https://github.com/EcomDev/mysql-to-jsonl/releases)

### Composer

[](#composer)

```
composer require ecomdev/mysql2jsonl
```

📜 License
---------

[](#-license)

This project is licensed under the MIT License.

See the [LICENSE](LICENSE) file for more details.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance42

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 72.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

7

Last Release

476d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/190d12eae43e0d874394cbc7fc49ea94c6b6e1bc8b05f75b94fbd0b9c4b5d15f?d=identicon)[IvanChepurnyi](/maintainers/IvanChepurnyi)

---

Top Contributors

[![IvanChepurnyi](https://avatars.githubusercontent.com/u/866758?v=4)](https://github.com/IvanChepurnyi "IvanChepurnyi (29 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (11 commits)")

---

Tags

backupmysqljsonl

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/ecomdev-mysql-to-jsonl/health.svg)

```
[![Health](https://phpackages.com/badges/ecomdev-mysql-to-jsonl/health.svg)](https://phpackages.com/packages/ecomdev-mysql-to-jsonl)
```

###  Alternatives

[spatie/laravel-backup

A Laravel package to backup your application

6.0k21.8M191](/packages/spatie-laravel-backup)[phpbu/phpbu

PHP Backup utility.

1.3k89.0k4](/packages/phpbu-phpbu)[rah/danpu

Zero-dependency MySQL dump library for easily exporting and importing databases

64401.8k10](/packages/rah-danpu)[cytopia/mysqldump-secure

Secure mysqldump script with encryption, compression, logging, blacklisting and Nagios monitoring integration

1474.7k1](/packages/cytopia-mysqldump-secure)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
