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
For those of you struggling with getting this done trying every possible answer you can find on SO. Here's what worked for me on a VPS running Windows 2012 R2 :
Place your sql file wherever the bin is for me it is located at C:\Program Files\MySQL\MySQL Server 8.0\bin
Open windows command prompt (cmd)
C:\Program Files\MySQL\MySQL Server 8.0\bin > mysql -u [username] -puse [database_name];C://Program Files//MySQL//MySQL Server 8.0//bin//mydatabasename.sqlIt did it for me as everything else had failed. It might help you too.