I'd like to automatize the initialization process of the MySQL
. At the end of the initialization process, I need to change the password of the database, using mysqladmin -uroot password
. But to automatize this, I need to type a new password manualy.
echo -e "newpassword\nnewpassword\n" | mysqladmin -uroot password
does not pass the new password to mysqladmin
command line tool.
Is there any method to achieve this?