2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 18:27:13 +08:00

fix: mysql_upgrade 只在 57 版本运行

This commit is contained in:
耗子
2023-11-21 11:19:46 +08:00
parent 12ad6e8879
commit fbf0b7acce

View File

@@ -137,10 +137,12 @@ chmod 644 ${mysqlPath}/conf/my.cnf
systemctl start mysqld
# 执行更新后的初始化
if [[ "${1}" == "57" ]]; then
${mysqlPath}/bin/mysql_upgrade -uroot -p${mysqlPassword}
fi
${mysqlPath}/bin/mysql -uroot -p${mysqlPassword} -e "DROP DATABASE test;"
${mysqlPath}/bin/mysql -uroot -p${mysqlPassword} -e "DELETE FROM mysql.user WHERE user='';"
${mysqlPath}/bin/mysql -uroot -p${mysqlPassword} -e "FLUSH PRIVILEGES;"
${mysqlPath}/bin/mysql_upgrade -uroot -p${mysqlPassword} --force
panel writePlugin mysql${1} ${mysqlVersion}