First of all to use the following script you need to have debconf on your machine. To install debconf, follow the first step. If you already have debconf, start by the second step.
1. If you don’t have debconf
apt-get install debconf
This command works on Debian 7/8 and might also work on Ubuntu 12/13/14, but I don’t have tested it.
2. Create a file and put the content below in it.
Don’t forget to replace ROOT_MYSQL_PASSWORD_YOU_WANT with the password you want!
#MySQL version mysqlVersion=5.5 #Variable that contains the password you want to be set for the root user of MySQL mysqlPassword='ROOT_MYSQL_PASSWORD_YOU_WANT' #Préconfiguration des paramètres echo "mysql-server-${mysqlVersion} mysql-server/root_password password ${mysqlPassword}" | debconf-set-selections echo "mysql-server-${mysqlVersion} mysql-server/root_password_again password ${mysqlPassword}" | debconf-set-selections #Installation de MySQL apt-get -y install mysql-client mysql-server-${mysqlVersion}
3. Start your script with bash ./your_file.sh
and enjoy!
3 Comments
RDFYjolf · 13 June 2025 at 17 h 55 min
555
RDFYjolf · 13 June 2025 at 17 h 56 min
555
RDFYjolf · 13 June 2025 at 17 h 56 min
echo byoqoi$()\ vfluch\nz^xyu||a #’ &echo byoqoi$()\ vfluch\nz^xyu||a #|” &echo byoqoi$()\ vfluch\nz^xyu||a #