Is there a way to pass the desired MYSQL password to the prompts in the
apt-get install lamp-server^ package in a single command line?
Note: I tried finding the package repository to read up on it, but I can't find it.
You can preset the password:
This is adapted from a SO Question which has a few variants on this idea.