Reputation: 3
So , i'm writing an auto mysql database installer in bash. I want to store the mysql password intro the bash script as a variable and use it directly.
Will create database.
mysqladmin -u root -p create account
PASSWD = "PASS"
mysqladmin -u root -p $PASSWD create account
How should i store corectly the password ?
Upvotes: 0
Views: 122
Reputation: 315
put password with -p without space
mysqladmin -u root -p$PASSWD create account
Upvotes: 1