How to Import a Large SQL File in XAMPP (Without the Timeout)
XAMPP's phpMyAdmin chokes on big dumps. Here's how to raise the limits or skip phpMyAdmin entirely with the MySQL command line.
XAMPP is the fastest way to get MySQL running locally — until you try to import a database that's bigger than a few megabytes. phpMyAdmin throws an upload error, or the import just stops halfway. There are two clean fixes.
Fix 1: Raise XAMPP's PHP limits
The default phpMyAdmin upload cap in XAMPP is usually 40MB. Open php.ini (XAMPP Control Panel → Apache → Config → php.ini) and bump these values:
upload_max_filesize = 512M
post_max_size = 512M
max_execution_time = 600
max_input_time = 600
memory_limit = 1024MRestart Apache from the XAMPP Control Panel for the changes to take effect. phpMyAdmin's upload limit on its import screen should now show the new number.
You almost certainly edited the wrong php.ini. XAMPP ships several. The one that matters is the one Apache loads — check phpinfo() for 'Loaded Configuration File' to find the exact path.
Fix 2: Skip phpMyAdmin, use the MySQL CLI
For anything over ~100MB, the command line is faster and won't time out. XAMPP bundles the mysql client. Open a terminal in your XAMPP install:
# Windows
cd C:\xampp\mysql\bin
mysql -u root -p your_database < C:\path\to\dump.sql
# macOS
/Applications/XAMPP/xamppfiles/bin/mysql -u root -p your_database < ~/dump.sqlThe default XAMPP root password is empty — just press Enter when prompted. Create the database first if it doesn't exist:
CREATE DATABASE your_database CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;Fix 3: Split the file first
If you're stuck with phpMyAdmin (no terminal access, locked-down machine), split the dump into chunks under the upload limit and import them in order. Each chunk keeps the SQL header so it imports cleanly on its own.
Split your dump for XAMPP
Break it into 30MB chunks that import one by one — no php.ini editing required.
Open SQLSplitWhich fix should you use?
Frequently Asked Questions
Why does XAMPP phpMyAdmin say my file is too large?
phpMyAdmin's upload size is limited by PHP's upload_max_filesize and post_max_size settings. Raise both in XAMPP's php.ini and restart Apache, or import via the MySQL command line which has no upload limit.
What's the XAMPP MySQL root password?
By default it's empty. When mysql prompts for a password, just press Enter. If you set one during setup, use that instead.
Is the command line faster than phpMyAdmin in XAMPP?
Yes, significantly. The CLI streams the file directly into MySQL without PHP's memory and execution-time limits, so large imports finish faster and won't time out.