To import sql compressed gz database file in the database server using cli. Follow the instructions and import the database file.

Syntax:

zcat ~/Document/database-filename.sql.gz | mysql -h hostname -u user-name -p password target-database -f

Example 01:

zcat ~/Document/filename.sql.gz | mysql -h localhost -u root -p root database-name -f

Example 02:

zcat ~/Document/filename.sql.gz | mysql -u root -p root database-name -f

Thank you!