Here is the steps for Create Database & import sql file into the database from command prompt.
Go to the command Prompt.
mysql -u root -p
(if ‘mysql’ is not recognized as an internal or external command error comes then see documentation for setting up your environment variable for mysql)
Create database my_db;
(note: here you have to specify your source .sql file path for instead of “file.sql”)
Now You can see the import process executes queries.
That’s All. Done.