I have a database called nitm
. I haven't created any tables there. But I have a SQL file which contains all the necessary data for the database. The file is nitm.sql
which is in C:\ drive
. This file has size of about 103 MB. I am using wamp server.
I have used the following syntax in MySQL console to import the file:
mysql>c:/nitm.sql;
But this didn't work.
From the mysql console:
mysql> use DATABASE_NAME;
mysql> source path/to/file.sql;
make sure there is no slash before path if you are referring to a relative path... it took me a while to realize that! lol