import database using terminal code example
Example 1: import database through command line
mysql -u username -p database_name < file.sql
Example 2: mysql export database command line
mysqldump -uroot -p root YourDatabaseName > WantedSQLFile.sql
Example 3: import file mysql terminal
mysql -u<username> -p<password> databaseName < /path/fileName.sql
Example 4: import database using cmd ubuntu
mysql -u username -p database_name < /path/to/file.sql