Both dev and prod are on the same server, but not in a multi-site install.
I have set up an alias file including %dump-dir path - a path that should be writeable by the account I'm doing the command from.
drush sql-sync @prod-studies @dev-studies
Access denied for user 'CorrectUser'@'localhost' to database 'CorrectDB'
Is it something to do with the fact that it is trying to ssh around on the same server that it is starting from?
Note that syncing the files works fine:
drush rsync @prod-studies:%files/ @dev-studies:%files