1mysql -u username -p database_name < file.sql
2
3
4Note-1: It is better to use the full path of the SQL file file.sql.
1Source : https://www.programmingquest.com/2018/08/how-to-export-mysql-database-using.html
2open cmd
3set mysql path in cmd
4 set path=c:\wamp\bin\mysql\mysql5.6.17\bin
5For database import (Restore):
6 mysql -u YourUser -p YourDatabaseName < filename.sql