SynthForge SynthForge SynthForge IO

Generate MariaDB Test Data

Generate production-ready MariaDB datasets with their own loader script, LOAD DATA LOCAL INFILE commands and foreign keys that resolve on the first import.

import_mariadb.sqlLOAD DATA INFILEBacktick quotingFK constraintsMariaDB 10.x + 11.xCSV export

MariaDB SQL output preview

Here's what SynthForge IO generates for MariaDB, ready to run.

mariadb.sql
CREATE DATABASE IF NOT EXISTS `synthforge_import`;
USE `synthforge_import`;

CREATE TABLE customers (
    id         INT PRIMARY KEY,
    name       VARCHAR(120) NOT NULL,
    email      VARCHAR(255) UNIQUE NOT NULL,
    tier       VARCHAR(20) DEFAULT 'free',
    notes      TEXT,
    created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE orders (
    id          INT PRIMARY KEY,
    customer_id INT NOT NULL,
    total       DECIMAL(10,2) NOT NULL,
    status      VARCHAR(20) DEFAULT 'pending',
    placed_at   DATETIME DEFAULT CURRENT_TIMESTAMP,
    CONSTRAINT fk_orders_customers_customer_id
        FOREIGN KEY (customer_id) REFERENCES customers(id)
);

-- Bulk load via LOAD DATA LOCAL INFILE, paths relative to your client
LOAD DATA LOCAL INFILE 'csv/customers.csv'
INTO TABLE customers
FIELDS TERMINATED BY ',' ENCLOSED BY '"'
LINES TERMINATED BY '\n' IGNORE 1 ROWS;
-- Example customer rows (Census-weighted surnames; first names match birth year)
-- Paul Pisacane, 1913-10-03
-- Raymond Leung, 1951-01-30
-- Marcella Noha, 2010-03-17

Built for MariaDB

Every export is optimized for MariaDB's specific syntax, types, and bulk loading commands.

Its Own Loader Script

Every CSV export ships an import_mariadb.sql of its own, not a MySQL script with the name changed. Run it against a fresh database and the schema, the constraints and the bulk-load commands are all there.

LOAD DATA LOCAL INFILE

Rows arrive through MariaDB's bulk loader rather than one INSERT at a time. CSV paths are written relative to your client, so the script runs from the folder you unzipped it into.

Foreign Keys That Resolve

Constraints are declared inside CREATE TABLE and the tables come out in dependency order. Nothing needs disabling before the import and nothing dangles after it.

Long Text Without Error 1170

Unmapped and long-form columns become TEXT so values are never truncated. When a TEXT, BLOB or JSON column is also a key, it is rewritten to VARCHAR(255) so InnoDB can index it, which is the difference between an import that runs and error 1170.

Who uses MariaDB test data?

Teams Off MySQL

Seed a MariaDB instance with the same dataset you were loading into MySQL, using a script written for MariaDB rather than one you have to adapt.

LAMP And Self-Hosted Stacks

Fill a local or staging database with realistic users, orders and content for the distributions that ship MariaDB as the default.

Migration Rehearsals

Generate one dataset and load it into both engines from the same export, so a MySQL to MariaDB move is tested against identical rows.

MariaDB Output, Not A MySQL Rename

MariaDB shares MySQL's column types and backtick quoting, so most of the DDL looks familiar. What matters is the parts that are decided per dialect.

A Script Per Dialect

The exporter writes seven loader scripts for every schema, one of which is import_mariadb.sql. Picking CSV is enough to get it; there is no separate MariaDB export to choose.

Backtick Quoting

Identifiers are quoted with backticks and checked against MariaDB's own reserved words, so a column called `order` or `rank` does not stop the import.

Key Columns Stay Indexable

A key column that would otherwise be TEXT or JSON is narrowed to VARCHAR(255). Non-key columns keep the unbounded type, so nothing is shortened just to be safe.

Referential Integrity In The Data

Child rows point at parent rows that exist. The constraint is not the only thing making that true; the generator builds the values that way.

Also available for

Frequently asked questions

Do I get a MariaDB script, or a MySQL one?
A MariaDB one. Every CSV export contains seven loader scripts, and import_mariadb.sql is generated for MariaDB specifically: its own type mapping, its own reserved-word list, and its own bulk-load commands. The two engines agree on a lot, so the output resembles the MySQL script, but it is not a copy of it.
Which MariaDB versions does this work with?
The DDL sticks to INT, VARCHAR, DECIMAL, DATETIME and TEXT, which every current MariaDB understands. That covers the 10.x series and 11.x.
How do I load the data?
Unzip the export and run mariadb -u user -p --local-infile=1 < import_mariadb.sql from the folder you unzipped into. The --local-infile=1 flag is required, or the client will not read the CSV files; MariaDB ships with the server half of local_infile on, which is the difference from MySQL 8. The paths inside the script are relative to your client, so running it from another folder is the usual reason a load cannot find them. The tables land in synthforge_import, which the script creates for you.
What happens to a long text column that is also a primary key?
It comes out as VARCHAR(255) rather than TEXT. MariaDB will not build an index on a large-object column, and a TEXT primary key fails the CREATE TABLE outright with error 1170. Columns that are not part of a key keep the unbounded type, so long generated values survive intact.
Can I use the same dataset for MySQL and MariaDB?
Yes, and that is the point of shipping every loader in one export. The CSV files are shared; import_mysql.sql and import_mariadb.sql each load them on their own terms. It makes a migration rehearsal a matter of running the other script.

Start Generating MariaDB Test Data

Design your schema, configure field types, and export production-ready MariaDB SQL in seconds.