Issue
I'm trying to execute below mysql command via ssh, of course this command works fine on server A, and I'm trying to execute it from server B via ssh.
ssh accountId@serverA "(cd dir1/dir2/; mysql --login-path=develop)"
but it fails with
mysql: unknown variable 'login-path=develop
does anyone know the reason?
Solution
I found the root cause and fixed!!! I'm posting it for someone who might suffer from similar problem.
My problem was several mysql binaries on serverA. The 'mysql' binary, one that I executed on serverA and from serverB via ssh were different. So I modified the command to use absolute path for mysql and it works fine now.
ssh accountId@serverA "(cd dir1/dir2/; /user/bin/mysql --login-path=develop)"
Answered By - genki98