Scripts to split up a PHPMyAdmin dump file into separate .SQL files
Go to file
Steve Dogiakos 991beaa9f0
Add Windows Batch Script for SQL Dump Splitting
This commit introduces a Windows batch (.bat) file as an alternative to the Python script for splitting SQL dumps. The batch script offers a convenient option for Windows users, especially those who prefer a quick, script-based solution without the need for Python. It reads a SQL dump file, identifies different databases, and creates separate SQL files for each database, ensuring ease of use and accessibility on Windows environments.
2023-12-30 14:46:25 -07:00
README.md Create README for SQL Dump Splitter project 2023-12-30 14:40:27 -07:00
split_sql_dump.bat Add Windows Batch Script for SQL Dump Splitting 2023-12-30 14:46:25 -07:00
split_sql_dump.py Add SQL dump splitter script 2023-12-30 14:35:12 -07:00

README.md

SQL Dump Splitter

Overview

This Python script is designed to split a large SQL dump file into individual files for each database. It's particularly useful for managing and organizing SQL dumps that contain multiple databases. The script reads through the SQL dump, identifies database sections based on a specific pattern, and creates new SQL files named after each database.

Features

  • Database Identification: Automatically detects different databases within a SQL dump.
  • File Creation: Generates separate SQL files for each database.
  • Efficiency: Processes large dump files quickly and accurately.

Getting Started

Prerequisites

  • Python 3.x

Installation

No additional installation is required for running this script, as it uses standard Python libraries.

Usage

  1. Place the SQL dump file in the same directory as the script, or specify the path to the file.

  2. Run the script using Python:

    python sql_dump_splitter.py
    
    

The script will create separate SQL files for each database in the dump.

Contributing

Contributions to the SQL Dump Splitter are welcome! Feel free to fork the repository and submit pull requests.