forked from forkanization/Proxmox-arm64
Replace existing repo with upstream
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
# Author: tteck
|
||||
# Co-Author: MickLesk (Canbiz)
|
||||
# License: MIT
|
||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://www.mysql.com/products/community | https://www.phpmyadmin.net
|
||||
|
||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||
@@ -21,14 +21,20 @@ $STD apt-get install -y \
|
||||
lsb-release \
|
||||
curl \
|
||||
gnupg \
|
||||
mc \
|
||||
wget \
|
||||
openssh-server
|
||||
mc
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
RELEASE_REPO="mysql-8.0"
|
||||
RELEASE_AUTH="mysql_native_password"
|
||||
read -r -p "Would you like to install the MySQL 8.4 LTS release instead of MySQL 8.0 (bug fix track; EOL April-2026)? <y/N> " prompt
|
||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||
RELEASE_REPO="mysql-8.4-lts"
|
||||
RELEASE_AUTH="caching_sha2_password"
|
||||
fi
|
||||
|
||||
msg_info "Installing MySQL"
|
||||
curl -fsSL https://repo.mysql.com/RPM-GPG-KEY-mysql-2023 | gpg --dearmor -o /usr/share/keyrings/mysql.gpg
|
||||
echo "deb [signed-by=/usr/share/keyrings/mysql.gpg] http://repo.mysql.com/apt/debian $(lsb_release -sc) mysql-8.0" >/etc/apt/sources.list.d/mysql.list
|
||||
echo "deb [signed-by=/usr/share/keyrings/mysql.gpg] http://repo.mysql.com/apt/debian $(lsb_release -sc) ${RELEASE_REPO}" >/etc/apt/sources.list.d/mysql.list
|
||||
$STD apt-get update
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
$STD apt-get install -y \
|
||||
@@ -38,7 +44,7 @@ msg_ok "Installed MySQL"
|
||||
|
||||
msg_info "Configure MySQL Server"
|
||||
ADMIN_PASS="$(openssl rand -base64 18 | cut -c1-13)"
|
||||
$STD mysql -uroot -p"$ADMIN_PASS" -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '$ADMIN_PASS'; FLUSH PRIVILEGES;"
|
||||
$STD mysql -uroot -p"$ADMIN_PASS" -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH $RELEASE_AUTH BY '$ADMIN_PASS'; FLUSH PRIVILEGES;"
|
||||
echo "" >~/mysql.creds
|
||||
echo -e "MySQL user: root" >>~/mysql.creds
|
||||
echo -e "MySQL password: $ADMIN_PASS" >>~/mysql.creds
|
||||
|
||||
Reference in New Issue
Block a user