Here it is :
- Create a hidden file (in home directory where the user would run the script) named ~/.my.cnf with the below sample contents :
- In Bash script, specified the user name "bob" to query the database and it will not prompt for password.
- That's all.
[mysql] user=bob password=secret
Hasta la vista !!!
No comments:
Post a Comment