Ich habe etwas gelesen und festgestellt, dass ich die Debconf für mysql-community festlegen muss. server vor der Installation. Mein Skript führt Folgendes aus:
Code: Select all
export DEBIAN_FRONTEND=noninteractive
apt-get install -y uuid-runtime debconf-utils gnupg wget
wget https://dev.mysql.com/get/mysql-apt-config_0.8.33-1_all.deb
dpkg -i mysql-apt-config_0.8.33-1_all.deb
apt-get update -y
MYSQL_PASS=$(uuidgen)
echo "mysql-community-server mysql-community-server/root-pass password $MYSQL_PASS" | debconf-set-selections
echo "mysql-community-server mysql-community-server/re-root-pass password $MYSQL_PASS" | debconf-set-selections
DEBIAN_FRONTEND=noninteractive apt-get install -y mysql-server
Code: Select all
hydra@hydra-debian-test:~$ sudo debconf-get-selections | grep mysql
mysql-apt-config mysql-apt-config/connectors-component string
mysql-apt-config mysql-apt-config/repo-codename select bookworm
mysql-apt-config mysql-apt-config/repo-distro select debian
mysql-apt-config mysql-apt-config/repo-url string http://repo.mysql.com/apt
mysql-apt-config mysql-apt-config/select-connectors select Enabled
mysql-apt-config mysql-apt-config/select-product select
mysql-apt-config mysql-apt-config/select-server select mysql-8.4-lts
mysql-apt-config mysql-apt-config/unsupported-platform select abort
mysql-community-server mysql-community-server/data-dir note
mysql-community-server mysql-community-server/re-root-pass password 8e80a9b1-4d5d-43f2-b2d8-f62b758d8f19
mysql-community-server mysql-community-server/remove-data-dir boolean false
mysql-community-server mysql-community-server/root-pass password 8e80a9b1-4d5d-43f2-b2d8-f62b758d8f19
mysql-community-server mysql-community-server/root-pass-mismatch error
mysql-community-server mysql-server/lowercase-table-names select
Code: Select all
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
Weiß jemand, was ich falsch mache oder ob ich etwas übersehen habe?
UDPATE:
Warum? das geschlossen? Ich möchte darauf hinweisen:
Code: Select all
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. You can edit the question so it's on-topic or see if it can be answered on another Stack Exchange site, but be sure to read the on-topic page for a site before posting there.