Skip to content

Commit

Permalink
fix: mysql_upgrade 只在 57 版本运行
Browse files Browse the repository at this point in the history
  • Loading branch information
devhaozi committed Nov 21, 2023
1 parent 12ad6e8 commit fbf0b7a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/mysql/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down

0 comments on commit fbf0b7a

Please sign in to comment.