HOW TO IMPORT DATABASE ON LOCALHOST USING CMD TERMINAL IN UBUNTU
SETP 1 : Open you terminal and use this cmd. CMD : /opt/lampp/bin/mysql -u root -p databaseName < filepath.sql //import database from terminal on local EXAMPLE : /opt/lampp/bin/mysql -u root -p DEMO_DB< /opt/lampp/htdocs/demo.sql
As we shows on above example DEMO_DB is a database name and demo.sql is a sql file.
For windows :
mysql -u root -p dbname < sql_file_name
/opt/lampp/htdocs/demo.sql this is my sql file path. user can change sql file path according to your file.
NOTE : when you are doing this then cmd will ask to you enter your password so password will be blank.
Share
Manish Garg
But In windows how to import data in MySQL
My suggestion:
Open the command line and trigger command given below
And try this one also