0

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 ?

1 Answer 1

1

put password with -p without space mysqladmin -u root -p$PASSWD create account

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.