UPDATE command denied to user 'retail_dba'

Hi,

I am sure someone should have raised this issue or it has been resolved, but unfortunately, didn’t find any solution.

I am facing permission denied issue while trying to update the table in MYSQL. Would you please guide me, where am I going wrong?

Please find the code and logs:

[shubhaprasadsamal@gw01 ~]$ sqoop eval --connect “jdbc:mysql://nn01.itversity.com:3306/retail_db” --username retail_dba --password itversity --query “update departments set department_name = ‘Testing Merge Update’ where department_id = 100”

Warning: /user/hdp/2.5.0.0-1245/accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
17/01/10 17:33:39 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6.2.5.0.0-1245
17/01/10 17:33:39 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
17/01/10 17:33:39 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
17/01/10 17:33:40 WARN tool.EvalSqlTool: SQL exception executing statement: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: UPDATE command denied to user ‘retail_dba’@‘gw01.itversity.com’ for table 'departments’
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.Util.getInstance(Util.java:386)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1054)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4187)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4119)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2570)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2731)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2820)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2159)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1383)
at org.apache.sqoop.tool.EvalSqlTool.run(EvalSqlTool.java:68)
at org.apache.sqoop.Sqoop.run(Sqoop.java:147)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:225)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:234)
at org.apache.sqoop.Sqoop.main(Sqoop.java:243)

Please suggest thanks.

Shitansu.

As mentioned by @itversity in last hangout,
We don’t have permission to create/update retail_dba database. There are couple of other tables in their like retail_import or retail_export, you could use those tables to create/update tables.

Thanks

yes, found out. Resolved.

Thanks,
Shitansu.