I am installing MySQL via the command line: sudo apt-get install mysql-server
. During the installation process, it prompts me for a root password.
How can I specify the MySQL password without having to wait for the screen to pop up and ask me the password? Is there a parameter I can pass to apt-get
to specify the MySQL root password so that I can write a script to perform the installation?
This should do it for you
Obviously you would replace PASSWORD with whatever you would want your MySQL root password to be