Access denied for user ‘APP’@’localhost’ (using password: YES)


Error Scenario:

Unable to open a test connection to the given database  or
Access denied for user ‘APP’@’localhost’ (using password: YES)

This error message (Access denied for user ‘APP’@’localhost’) will be received while trying to connect hive service through MySQL local metastore.

Root Cause:

When we don’t provide username (javax.jdo.option.ConnectionUserName) and password (javax.jdo.option.ConnectionPassword) configurations in hive-site.xml for accessing MySQL local metastore database we will receive this error message. By default these two properties are defined in hive-default.xml file with below values.

Resolution:

For resolution of the above error message we need to provide the above two properties with valid values as shown below into hive-site.xml file.

For username, we have to specify a valid username in Ubuntu machine with full access to MySQL database or root username with root’s password. 

hive-site

Replace ‘xxxxxx’ with actual password in the value for field javax.jdo.option.ConnectionPassword. 


Profile photo of Siva

About Siva

Senior Hadoop developer with 4 years of experience in designing and architecture solutions for the Big Data domain and has been involved with several complex engagements. Technical strengths include Hadoop, YARN, Mapreduce, Hive, Sqoop, Flume, Pig, HBase, Phoenix, Oozie, Falcon, Kafka, Storm, Spark, MySQL and Java.

Leave a comment

Your email address will not be published. Required fields are marked *