From ede8b1269cb03178c31f700200309dd76b00dd5a Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Mon, 9 Dec 2019 14:21:21 +0900 Subject: [PATCH] mysql: Don't bother to change auth plugin on centos This partially reverts the previous change [1], which broke networking-midonet jobs. [1] https://review.opendev.org/#/c/681201/ Closes-Bug: #1855516 Change-Id: I0255c6acce72a8376dbc6d8f8d0314a7dabf019c --- lib/databases/mysql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/databases/mysql b/lib/databases/mysql index 4e3cc72bdb..420a86e04e 100644 --- a/lib/databases/mysql +++ b/lib/databases/mysql @@ -105,7 +105,7 @@ function configure_database_mysql { # In mariadb e.g. on Ubuntu socket plugin is used for authentication # as root so it works only as sudo. To restore old "mysql like" behaviour, # we need to change auth plugin for root user - if [ "$MYSQL_SERVICE_NAME" == "mariadb" ]; then + if is_ubuntu && [ "$MYSQL_SERVICE_NAME" == "mariadb" ]; then sudo mysql $cmd_args -e "UPDATE mysql.user SET plugin='' WHERE user='$DATABASE_USER' AND host='localhost';" sudo mysql $cmd_args -e "FLUSH PRIVILEGES;" fi