How to Import Large SQL Files into MySQL Using Laragon
Hello friends in this tutorial we will learn step-by-step to import large SQL files into MySQL using Laragon. Generaly you can not import larage sql file directly into MySQL. Learn how to move your Large SQL file, create a database, import data, and check your tables.
If you are using Laragon on your C or D: drive, your MySQL or MariaDB files are usually under:
C:\laragon\bin\mysql\mysql-8.x.x\bin
D:\laragon\bin\mysql\mysql-8.x.x\bin
Here’s how to safely import a large demo.sql
file (e.g., 500MB, 1GB, 10GB) into MySQL using Laragon:
Step 1: Move Your SQL File
Place your SQL file in an easy-to-access folder. Folder can be anywhere. For example:
D:\laragon\data\demo.sql
Step 2: Open Laragon Terminal
Just click on the terminal tab and this opens CMD or PowerShell already pointed to D:\laragon
.
Step 3: Create Your MySQL Database (optional)
If you don’t already have a database, create one. if you have a database skip this step.
Type:
mysql -u root -p
Press Enter (Laragon’s default MySQL root user has no password). So you can remove -p if root user has no password.
Inside the MySQL shell, run:
CREATE DATABASE demo_db;
EXIT;
(Replace demo_db
with your preferred database name.)
Step 4: Import Your SQL File into MySQL
Run this command in CMD:
mysql -u root demo_db < "D:\laragon\data\demo.sql"
-
root
→ MySQL user (default isroot
) -
demo_db
→ Your database name -
"D:\laragon\data\demo.sql"
→ Full path to your SQL file
Step 5: Verify the Import
Open MySQL shell again:
mysql -u root demo_db
Check your tables:
SHOW TABLES;
Now you should see all your tables successfully imported.
You May Also Like Bellow Articles:
Send SMS to Any Mobile Number Using Laravel 12 – Step-by-Step Guide
How to Stop Users from Using Weak Passwords in Laravel 12
Laravel live search data in a table using ajax.
How to send SMS in laravel using Twilio SMS API-Webjourney
Laravel pdf invoice generate and download with barryvdh dompdf
How to create multi language website by laravel
Laravel 11 multiple form validation on the same page-WebJourney
Laravel 10,11 Breeze Authentication - WebJourney
Laravel 11 Ajax jQuery Crud with Pagination and Live Search
Laravel Naming Conventions Accepted by Laravel community
Laravel Shorter and More Readable Syntax - WebJourney