ssh download file from ec2

How to export database and download to localhost from EC2

You have the pem file and want to connect to server, export database then need to download it to your machine in...