How to Import MySQL Database Through Command Line (CMD): Windows 10
Hello, every one in this article I will show you how to “How to Import MySQL Database Through Command Line (cmd)” because some time due the large in database size we are unable to import (.sql file) through phpmyadmin and face “max_file_uploads” problem. so we have a different method of using that method you can import any size of the database through command line in Windows PC.
For my PC used Xampp server to rum my script file and Widows 1o on machine pc.
Why Need to Import MySQL database From Command Line
Some time due to larger in size, phpmyadmin server doesn’t allow users to import the MySQL database file through the panel, so in these case, we need to change or modify or php.ini file or any other way to import MySQL database file.
So by using cmd command, you can easily import any size of the database in minutes.
How to Import MySQL database From Command Line
Follow the steps to import MySQL database using command line terminal.
Step 1: First open the command terminal.
Step 2: you can go through hold windows key and press R button.
Step 3: Enter cmd in run command.
Step 4: Enter C:\xampp\mysql\bin\mysql -u root -p -h localhost.
Step 5: Create database database_name.
Step 6: Use database name.
Step 7: source C:\Users\Houzaifa\Desktop\foldername\database_name.sql
Note: Enter your username, password according to your database.
“Hope this article will help“.