I have a bash script that runs a bunch of MySQL commands, separated by user input.
Each time a query is run, the password must be re-entered.
I understand it's best to avoid putting the password on the commandline, so I am wary of asking the user for the password and then passing it in on the commandline to each command.
Is there a recommended way to do this without compromising security?