ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [2/2] ambari git commit: AMBARI-17161. Ubuntu 16, Hive Metastore Start failed (aonishuk)
Date Mon, 13 Jun 2016 11:55:55 GMT
AMBARI-17161. Ubuntu 16, Hive Metastore Start failed (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8edd8fd3
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8edd8fd3
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8edd8fd3

Branch: refs/heads/branch-2.4
Commit: 8edd8fd3a2c3235ef7a80ecc962c700b49cb7872
Parents: e3b945f
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Mon Jun 13 14:55:45 2016 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Mon Jun 13 14:55:45 2016 +0300

----------------------------------------------------------------------
 .../HIVE/0.12.0.2.0/package/files/addMysqlUser.sh       | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8edd8fd3/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/files/addMysqlUser.sh
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/files/addMysqlUser.sh
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/files/addMysqlUser.sh
index 36ed58f..862e9b2 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/files/addMysqlUser.sh
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/files/addMysqlUser.sh
@@ -28,10 +28,12 @@ userhost=$4
 # The restart (not start) is required to pick up mysql configuration changes made by sed
 # during install, in case mysql is already started. The changes are required by Hive later
on.
 /var/lib/ambari-agent/ambari-sudo.sh service $mysqldservice restart
-  
+
+# MySQL 5.7 installed in non-interactive way uses a socket authentication plugin.
+# "mysql -u root" should be executed from root user
 echo "Adding user $mysqldbuser@% and removing users with empty name"
-/var/lib/ambari-agent/ambari-sudo.sh su mysql -s /bin/bash - -c "mysql -u root -e \"CREATE
USER '$mysqldbuser'@'%' IDENTIFIED BY '$mysqldbpasswd';\""
-/var/lib/ambari-agent/ambari-sudo.sh su mysql -s /bin/bash - -c "mysql -u root -e \"GRANT
ALL PRIVILEGES ON *.* TO '$mysqldbuser'@'%';\""
-/var/lib/ambari-agent/ambari-sudo.sh su mysql -s /bin/bash - -c "mysql -u root -e \"DELETE
FROM mysql.user WHERE user='';\""
-/var/lib/ambari-agent/ambari-sudo.sh su mysql -s /bin/bash - -c "mysql -u root -e \"flush
privileges;\""
+/var/lib/ambari-agent/ambari-sudo.sh mysql -u root -e "CREATE USER '$mysqldbuser'@'%' IDENTIFIED
BY '$mysqldbpasswd';"
+/var/lib/ambari-agent/ambari-sudo.sh mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO '$mysqldbuser'@'%';"
+/var/lib/ambari-agent/ambari-sudo.sh mysql -u root -e "DELETE FROM mysql.user WHERE user='';"
+/var/lib/ambari-agent/ambari-sudo.sh mysql -u root -e "flush privileges;"
 /var/lib/ambari-agent/ambari-sudo.sh service $mysqldservice stop


Mime
View raw message