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
diff --git a/lib/databases/mysql b/lib/databases/mysql
index 4e3cc72..420a86e 100644
--- a/lib/databases/mysql
+++ b/lib/databases/mysql
@@ -105,7 +105,7 @@
     # 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