export GNUPGHOME=/tmp/gpg
mkdir -p /etc/apt/keyrings/
mkdir -p /tmp/gpg
cd /tmp/gpg
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys '859BE8D7C586F538430B19C2467B942D3A79BD29'
gpg --batch --export '859BE8D7C586F538430B19C2467B942D3A79BD29' > /etc/apt/keyrings/mysql.gpg
echo 'deb [ signed-by=/etc/apt/keyrings/mysql.gpg ] http://repo.mysql.com/apt/ubuntu/ jammy mysql-8.0' > /etc/apt/sources.list.d/mysql.list
gpgconf --kill all
rm -rf /tmp/gpg
apt install mysql-server
#todo: script initial config & removal of insecure logins
No comments:
Post a Comment