MySQL
How to Import MySQL Database Through Command Line (CMD): Windows 10

How to Import MySQL Database Through Command Line (CMD): Windows 10

By: SolutionsHint    539 views Updated: 10th Jan, 2018
How to Import MySQL Database Through Command Line

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“.

 

About the Author

I am a professional blogger from my heart, I am going through all the possible ways that can help to audience. I am trying my best to write content that my readers will like me. I will really be happy when my readers will become more happy with my blog.

Leave a Reply

Your email address will not be published. Required fields are marked *