I’m not sure what environment you are installing Magento in but this will help other users with this same problem if this does not help you. You can use the below steps to import your database via SSH.
You have to upload the file to the public_html directory via FTP then login to your server via SSH, enter to the directory by the following command:
username: the username of the cPanel account.
Then enter the following command to import to the database:
mysql -u dbusername -p database < filename
dbusername: the username of the database
database: the name of the database
filename: the filename such as magento_sample_data.sql
Here is an example command:
mysql -u beta_admin -p beta_magento < magento_sample_data_for_0.7.15480.sql
Hope that helps!