Friday, 15 May 2015

Importing a .sql file into database

Execute this command where the sql file named file.sql resides or give the full path of the file.


mysql -u root -p < file.sql


(replace `root` with appropriate username. Since root is default username and often users don't change it, it should also do fine)