I am trying to connect to a remote MySQL Server from a Jenkins job.
I bound the MySQL user credentials into two variables MYSQL_USERNAME
and MYSQL_PASSWORD
. I need to SSH first, and then connect to MySQL. The shell command I used is:
ssh remote_server mysql --user="$MYSQL_USERNAME" --password="$MYSQL_PASSWORD" -e "SHOW DATABASES;"
(Build Step-> Execute shell)(quotes only for --user, --password and -e)
Summary of Error: Using MySQL credentials on command line is insecure, and I get whole mysql help commands.
Any help is appreciated.