Why drush sql-sync fails with mysqldump unknown variable error? I am having issues trying to sync my staging server with my local server using drush sql-sync command. 

I've set my aliases right and the same configuration is working with my development server and local machine.

Here are the issues I get once I type in:

drush sql-sync @stag @local


I get the standard warning about backing up my target database.

Then I'm having this error:

stdin: is not a tty
mysqldump: unknown variable 'table_cache=67108864'
Database dump failed 


So I am pretty sure this has something to do with MySQL configuration on the staging server.

From what I've googled/read, a large value for the table_cache is not necessarily a good one for the server and can slow it down. But I am not sure what a "good" value is.
This does look like an issue with mysql, not Drush.  Run your Drush command again with the -s flag (simulate); 

drush sql-sync @stag @local -s


Drush will then print out the shell commands that it would execute, without doing anything.  You can copy the mysqldump command into your shell, and experiment with the options until the dump works.