I am going to run the following, but need to pass a password into .sql file as well. I am hoping I will read pwd from the some secure file and can pass it in
mysql --login-path=db_server ${db} < "/path/to/sql_script/update.sql"
I am going to run the following, but need to pass a password into .sql file as well. I am hoping I will read pwd from the some secure file and can pass it in
mysql --login-path=db_server ${db} < "/path/to/sql_script/update.sql"
Although the command-line tool will get really upset, it'll still let you supply a password with the --password=XXXXX
argument. You cannot put it in the .sql
file.
You can also put the password in a config file in your home directory, like .mylogin.cnf
or ~/my.cnf