step 1: Open XAMPP server and click on shell step 2: mysql -u root -p Step 3: Enter password of your database, normally it will be empty Step 4: use <database_name> [select database] step 5: source <SQL_file_destination> [enter your SQL file path]
Details
- Open XAMPP control panel and click on the “Shell” button.
- In the shell, type
mysql -u root -pand hit Enter. This will prompt you to enter the password for the root user (if you haven’t set a password, you can just hit Enter). - Once you’re logged into MySQL, type
use <database_name>to select the database you want to import the SQL file into. - Finally, type
source <SQL_file_destination>and provide the path to the SQL file you want to import (e.g.C:\path\to\file.sql). Hit Enter to execute the command, and wait for the import process to complete.
Once the import is finished, you should see a confirmation message in the shell, and the data from the SQL file should be available in your database.

