Description
Improve debugging for dba_script.py, print the jisql commands in the console without the password. Ranger admin installation logs print ranger admin user password when it creates rangeradmin user.
2016-07-17 06:07:59,156 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://172.22.95.18/mysql -u root -p '********' -noheader -trim -c \; -query "SELECT version();" 2016-07-17 06:07:59,808 [I] Verifying user rangeradmin for Host % 2016-07-17 06:07:59,808 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://172.22.95.18/mysql -u root -p '********' -noheader -trim -c \; -query "select user from mysql.user where user='rangeradmin' and host='%';" 2016-07-17 06:08:00,469 [I] MySQL user rangeradmin does not exists for host % 2016-07-17 06:08:00,469 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://172.22.95.18/mysql -u root -p '********' -noheader -trim -c \; -query "create user 'rangeradmin'@'%' identified by 'rangeradmin';" 2016-07-17 06:08:01,137 [I] Verifying user rangeradmin for Host % 2016-07-17 06:08:01,137 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://172.22.95.18/mysql -u root -p '********' -noheader -trim -c \; -query "select user from mysql.user where user='rangeradmin' and host='%';" 2016-07-17 06:08:01,762 [I] MySQL user rangeradmin created for host % 2016-07-17 06:08:01,762 [I] Verifying user rangeradmin for Host localhost 2016-07-17 06:08:01,762 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://172.22.95.18/mysql -u root -p '********' -noheader -trim -c \; -query "select user from mysql.user where user='rangeradmin' and host='localhost';" 2016-07-17 06:08:02,362 [I] MySQL user rangeradmin does not exists for host localhost 2016-07-17 06:08:02,363 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://172.22.95.18/mysql -u root -p '********' -noheader -trim -c \; -query "create user 'rangeradmin'@'localhost' identified by 'rangeradmin';" 2016-07-17 06:08:02,964 [I] Verifying user rangeradmin for Host localhost 2016-07-17 06:08:02,964 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://172.22.95.18/mysql -u root -p '********' -noheader -trim -c \; -query "select user from mysql.user where user='rangeradmin' and host='localhost';" 2016-07-17 06:08:03,580 [I] MySQL user rangeradmin created for host localhost 2016-07-17 06:08:03,581 [I] Verifying user rangeradmin for Host 172.22.95.18 2016-07-17 06:08:03,581 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://172.22.95.18/mysql -u root -p '********' -noheader -trim -c \; -query "select user from mysql.user where user='rangeradmin' and host='172.22.95.18';" 2016-07-17 06:08:04,144 [I] MySQL user rangeradmin does not exists for host 172.22.95.18 2016-07-17 06:08:04,144 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://172.22.95.18/mysql -u root -p '********' -noheader -trim -c \; -query "create user 'rangeradmin'@'172.22.95.18' identified by 'rangeradmin';" 2016-07-17 06:08:04,721 [I] Verifying user rangeradmin for Host 172.22.95.18 2016-07-17 06:08:04,722 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://172.22.95.18/mysql -u root -p '********' -noheader -trim -c \; -query "select user from mysql.user where user='rangeradmin' and host='172.22.95.18';"
Attachments
Attachments
Issue Links
- is related to
-
RANGER-714 Enhancements to the db admin setup scripts.
-
- Resolved
-
- links to