I am trying to execute a few mysql statements in bash script. The script connects to mysql and does all the required work. But, it gives me a warning
Warning: Using a password on the command line interface can be insecure.
I understand that passwords and usernames must not be used directly in the script, which I have currently done
What other options do I have in order to not have this warning coming up? Can I have a file with the key:value pairs for host,dbname,username and password and then use the file for connection details in the script?
Thanks in advance Rathi