I'm creating a sh file to start a Linux programming environment to automate this boot process. I usually just run the following command lines and during the MySql installation process I have to choose the ROOT user password.
This is the code:
//Iniciar sessão como super usuário para não escrever senha todo o tempo.
sudo su #MyPassword#
//Limpar a tela
clear
//Fazer a atualização do apt-get.
apt-get update
//Limpar a tela
clear
//Instalar MySql Server
apt install mysql-server
//Escolher a senha para root. OK
//Limpar a tela
clear
How do I pass the mysql installation statement and get the root password at the same time?