We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac3f969 commit 9ce9de8Copy full SHA for 9ce9de8
misc/tools.func
@@ -1322,7 +1322,7 @@ function setup_mysql() {
1322
CURRENT_OS="$(awk -F= '/^ID=/{print $2}' /etc/os-release)"
1323
1324
if command -v mysql >/dev/null; then
1325
- CURRENT_VERSION="$(mysql --version | grep -oP 'Distrib\s+\K[0-9]+\.[0-9]+')"
+ CURRENT_VERSION="$(mysql --version | grep -oP '[0-9]+\.[0-9]+' | head -n1)"
1326
if [[ "$CURRENT_VERSION" != "$MYSQL_VERSION" ]]; then
1327
$STD msg_info "MySQL $CURRENT_VERSION will be upgraded to $MYSQL_VERSION"
1328
NEED_INSTALL=true
0 commit comments