Host Locally

Follow these steps to run this project on your local machine and use all three modes from the browser.

1) Clone this repository

git clone https://github.com/kedarvj/mysql-random-data-generator-web.git
cd mysql-random-data-generator-web

2) Prerequisites

  • PHP 8.1+ with PDO and MySQL extensions enabled
  • MySQL server (local or reachable from your machine)
  • A modern browser

3) Start a local PHP server

php -S 127.0.0.1:8080

Start this command from the project root where `index.html` and the `api` folder exist.

4) Open the app

http://127.0.0.1:8080/index.html

5) Use the project modes

  • Mode 1: Generate SQL from a `CREATE TABLE` statement (no DB connection).
  • Mode 2: Test DB connection and populate random rows in batches.
  • Mode 3: Use CLI copy commands for manual SQL/script workflow.

Inspiration

This web project is inspired by the original stored-procedure-based generator: kedarvj/mysql-random-data-generator.