upload .sql databse in ubuntu database code example
Example 1: how to import database in mysql by cmd
mysql -u username -p database_name < file.sql
Example 2: import mysql db
zcat /path/to/file.sql.gz | mysql -u 'root' -p your_database
mysql -u username -p database_name < file.sql
zcat /path/to/file.sql.gz | mysql -u 'root' -p your_database