+1 on Chakra Sankaraiah’s comment.
I ran into the same problem,
Step 1, enable verbosity. E.g.,
$ export HIVE_CONF_DIR=/etc/hive/conf.server ; /usr/hdp/current/hive-metastore/bin/schematool -dbType mysql -userName hive -passWord xxxx -initSchema -verbose
Caused by: java.sql.SQLException: Access denied for user 'hive'@'localhost' (using password: YES)
Step 2) Grant permissions if needed
mysql -uroot
GRANT ALL ON *.* to 'hive'@'localhost' IDENTIFIED BY 'xxxx';
exit;
Step 3) Run the command again,
Initialization script completed
schemaTool completed