All they gave me is SSH login and I'm quite new to this. My site is running on Drupal 7 and in settings.php the database connect line looks like this:
$db_url = 'mysqli://user:pw@host:3306/dbname';
So it means it is using different host IP address than the SSH/SFTP, so I tried something like this:
mysqldump -u user -p -h host:3306 --opt dbname > backup.sql
But it doesn't work, I get erorrs:
mysqldump: Got error: 2005: Unknown MySQL server host 'host:3306' (0) when trying to connect
This should be enough:
mysqldump -u user -p -h db_host db_name > backup.sql