How to Import large sql database files into MySql using command line
How to Import large sql database files into MySql, PhpMyAdmin allows us to import sql files into MySQL database, but it has a restriction of up-to 2 Mega Bytes in localhost, what if you want to import an 125 Mega Bytes of SQL file. That’s a huge file but once i have to upload the same sized file, it took me less than a minute to import that much SQL file using the MySql Console. Simply open up MySql command prompt console, and log-in with the user-name and password. If you want to import it into an existing database then type following command.
Select Database – Import large sql database files into MySql
This below command selects the database
Create Database if you don’t have one
If you don’t have an existing database then create one database.
You can create database by using below command, then select the database.
CREATE database your_database_name; USE your_database_name;
SQL Command to import large sql file
After creating and selecting the database, import the sql file using this command.
It takes less than a minute to complete the task.
If you have any problem or difficulty in Import large sql database files into MySql, please let us know by using comment form below.