SELECT Command for retail_user in orders table showing error


This is error msg in after running below sqoop command:

Error msg: SELECT command denied to user ‘retail_user’@‘’ for table ‘orders’

sqoop command:

sqoop import
–connect jdbc:mysql://
–username retail_user
–password itversity
–query “select o.*, sum(order_item_subtotal) order_revenue
from o.orders join oi.order_items
on o.order_id = oi.order_item_id
and $CONDITIONS group by o.order_id, o.order_date, o.order_customer_id, o.order_status”
–target-dir /user/vivekmishra22117/sqoop_import/retial_db
–num-mappers 2
–split-by order_id


You need to grant permission to your user in mysql.

mysql> GRANT ALL PRIVILEGES ON database_name.* TO 'username'@'localhost';


Actually retail_user has already have all privileges…?
and your suggestion is also not working Error is: Access denied


Did you login as root user and then tried grant all privileges?