Getting error Access denied for user ‘retail_user’@’%’ for sqoop command

Hi ,

Thanks for your support in providing the lab access . While trying to import data from sqoop , I have noticed that the username retail_user do not have access to the databases . Can you please advise me in this scenario? My username is sanjeev9s. Please let me know if you need any more details , I will be happy to provide with.

Could you please reply with the full command which you have tried & error you are getting so that we can help you in a betterway.

Hi Ramesh ,

please find the below details :
sqoop list-tables
–connect jdbc:mysql://gw03.itversity.com:3306/retail_db/
–username retail_user
–password itversity

output:

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Access denied for user ‘retail_user’@’%’ to database ‘retail_db/’
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

You are using a wrong JDBC url. You have to give ms.itversity.com instead of gw03.itversity.com

I am getting the same error for ms.itversity.com too

You are giving / after giving database name & you have to give -- instead of - while passing arguments to sqoop command. Please go through the below command for your reference.

sqoop list-tables \
  --connect jdbc:mysql://ms.itversity.com:3306/retail_db \
  --username retail_user \
  --password itversity