Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script does not work when MySQL password contains special characters like $ #1

Open
samir-plusb opened this issue Oct 10, 2018 · 0 comments

Comments

@samir-plusb
Copy link

Hey,

very nice script! Thanks for the good work!

I tested it in one of our deployment tasks and recognized, that the password will not be sent correctly to the remote host.

Example:

./bin/mysqldump-remote.sh -v --compress=1 \ 
    --ssh-user=ssh_user \ 
    --ssh-host=host.mydomain.com \ 
    --mysql-user=mysql_user \ 
    --mysql-host=localhost \ 
    --mysql-database=my_database \
    --mysql-password='my_pass_with$_character'

The command, which will be executed on the remote host, will look like this:

 mysqldump -v -u mysql_user -h host.mydomain.com -p'my_pass_with' my_database

Therefore any connection to the database server will be declined.

Any ideas how to solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant