terminal import mysql database code example
Example 1: import database mysql command line
mysql -u username -p new_database < data-dump.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: how to import mysql database command line
mysql>create database yourDatabaseName;
mysql>use yourDatabaseName;