MySQL Random Data Generator

A specialized tool designed for developers and DBAs to generate test data for MySQL tables. Quickly create MySQL test data by generating SQL files or populating your database directly with randomized values.

Developer API

Integrate data generation into your CI/CD or scripts.

API Documentation
Disclaimer

This tool is for generating test data only. Never use it on production databases. Generated data is randomized and not intended to be meaningful.

Generate SQL (No Database Connection)

SQL Preview (First 10 rows)

                                
                            

Connect to Database and Populate Data

Warning! This will execute INSERT statements on your database. Ensure you have a backup or are using a test environment.
Progress
Ready...

DIY / CLI Instructions

Manual Execution Steps

Follow these steps to run the data generator manually via command line.

1. Download the reference script
wget https://raw.githubusercontent.com/kedarvj/mysql-random-data-generator/master/populate.sql
2. Load the procedure into your database
mysql -u username -p db_name < populate.sql
3. Call the populate procedure

Arguments: CALL populate(database_name, table_name, num_rows, 'Y/N' [debug-mode])

mysql -u username -p db_name -e "CALL populate('my_db', 'my_table', 1000, 'N')"

Why This Tool Exists

Generating test data is often a tedious and repetitive task for developers and DBAs. Writing custom scripts or manually creating SQL statements to fill tables can lead to errors and consume valuable development time. This tool solves that problem by providing an automated, predictable, and safe way to generate test data, allowing you to focus on building features rather than filling databases.

How It Works

Simply paste your CREATE TABLE statement. Our parser identifies columns and types, then generates a downloadable SQL file with INSERT statements. No database access required.

Provide your database credentials to connect directly. The tool inspects your table schema and inserts randomized data in batches, perfect for populating local or development environments.

For those who prefer the terminal, we provide copyable commands to download and run the original populate.sql script directly via the MySQL command-line client.

Frequently Asked Questions

Is this safe for production?

No. This tool is strictly for test and development data. Never use it on production databases as it performs bulk insertions and generates randomized data.

Are credentials stored?

No. Database credentials are only used for the current session and are never logged, stored, or transmitted to any third-party services.

Can I use it without database access?

Yes. Mode 1 allows you to generate SQL files entirely on your machine without requiring any database connection or permissions.

What limits apply?

For browser stability, we apply a 100,000 row limit for SQL generation. Direct database population is batched to prevent timeouts.

Support & Feedback

If you encounter bugs or have feature requests, report it on GitHub page.

Transparency

No telemetry. No tracking. Just a tool for DBAs and developers.