coosal coosal - 4 years ago 387
SQL Question

import sql file from mysql console

I have a database `nitm`. I haven't created any tables there. But I have an 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 103M. 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.

Please help me with this.

Answer Source

Finally, i solved the problem. I placed the `nitm.sql` file in `bin` file of the `mysql` folder and used the following syntax.

C:\wamp\bin\mysql\mysql5.0.51b\bin>mysql -u root nitm < nitm.sql

And this worked.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download