I am running mysql_secure_installation
which prompts the user for the root database password and asks the user to enter Yes or No to some other initial setup options. How would I capture the root password that the user enters?
I'm thinking something like :
capture = subprocess.Popen(['mysql_secure_installation'], stdout=subprocess.PIPE)
root_pwd = capture.communicate()
I'd like to also feed in default options to the other prompts. How can I do that?