Browse code

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

YAMAMOTO Takashi authored on 2019/12/09 14:21:21
Showing 1 changed files
... ...
@@ -105,7 +105,7 @@ function configure_database_mysql {
105 105
     # In mariadb e.g. on Ubuntu socket plugin is used for authentication
106 106
     # as root so it works only as sudo. To restore old "mysql like" behaviour,
107 107
     # we need to change auth plugin for root user
108
-    if [ "$MYSQL_SERVICE_NAME" == "mariadb" ]; then
108
+    if is_ubuntu && [ "$MYSQL_SERVICE_NAME" == "mariadb" ]; then
109 109
         sudo mysql $cmd_args -e "UPDATE mysql.user SET plugin='' WHERE user='$DATABASE_USER' AND host='localhost';"
110 110
         sudo mysql $cmd_args -e "FLUSH PRIVILEGES;"
111 111
     fi