user3110409 user3110409 - 1 year ago 164
Bash Question

mysql: unknown variable 'login-path=develop' via ssh

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?

Answer Source

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)"
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download