Tuesday, May 19, 2015

How to dump a .sql file into mysql database

There are different ways you can dump a .sql file into a mysql database. But here is a quick way to do this.

Assume that you want to load the file "datafile.sql" into database named "alldata" Simply use these commands:

>> mysql

>> use alldata;

>> source datafile.sql;

>> show tables; //Displays all the tables dumped into this database. 

No comments: