Get the App
SLTechnology News&Howtos  ›  Servers  › 

Sqoop directs data Times database access from mysql to hive what if access is denied?

Shulou Source: shulou.com Published: 2022-06-01 10:37:13 09月15日 Update

This article mainly explains "what to do if sqoop guides the data Times database access from mysql to hive". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what to do when sqoop guides data Times database access from mysql to hive".

Sqoop imports data from mysql to hive and reports that database access is denied. But the weird thing is that the error report of sqoop indicates that the mysql that connects to the local computer is rejected, not that the mysql where the connection target data is located is rejected. Mine is also connected to zookeeper and will prompt that the mysql connected to all zookeeper hosts has been rejected. The log is at the bottom.

In fact, these problems are all due to the fact that the mysql where the target data is located restricts the host of zookeeper to access it. You only need to authorize it on the mysql.

Execution

Grant all privileges on *. * to hadoop@'%' identified by 'password';flush privileges

Error log:

10:51:30 on 15-09-17 ERROR manager.SqlManager: Error executing statement: java.sql.SQLException: Access denied for user 'hadoop'@'192.168.1.110' (using password: YES) java.sql.SQLException: Access denied for user' hadoop'@'192.168.1.110' (using password: YES) at com.mysql.jdbc.SQLError.createSQLException (SQLError.java:1094) at com.mysql.jdbc.MysqlIO.checkErrorPacket (MysqlIO.java:4208 ) at com.mysql.jdbc.MysqlIO.checkErrorPacket (MysqlIO.java:4140) at com.mysql.jdbc.MysqlIO.checkErrorPacket (MysqlIO.java:925) at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication (MysqlIO.java:1747) at com.mysql.jdbc.MysqlIO.doHandshake (MysqlIO.java:1287) at com.mysql.jdbc.ConnectionImpl.coreConnect (ConnectionImpl.java:2494) at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly (ConnectionImpl.java:2527) at com.mysql.jdbc.ConnectionImpl.createNewIO (ConnectionImpl.java:2309) at com.mysql.jdbc.ConnectionImpl. (ConnectionImpl.java:834) at com.mysql.jdbc.JDBC4Connection. (JDBC4Connection.java:46) at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java: 45) at java.lang.reflect.Constructor.newInstance (Constructor.java:526) at com.mysql.jdbc.Util.handleNewInstance (Util.java:408) at com.mysql.jdbc.ConnectionImpl.getInstance (ConnectionImpl.java:419) at com.mysql.jdbc.NonRegisteringDriver.connect (NonRegisteringDriver.java:344) at java.sql.DriverManager.getConnection (DriverManager.java:571) at java.sql.DriverManager.getConnection (DriverManager. Java:215) at org.apache.sqoop.manager.SqlManager.makeConnection (SqlManager.java:885) at org.apache.sqoop.manager.GenericJdbcManager.getConnection (GenericJdbcManager.java:52) at org.apache.sqoop.manager.SqlManager.execute (SqlManager.java:744) at org.apache.sqoop.manager.SqlManager.execute (SqlManager.java:767) at org.apache.sqoop.manager.SqlManager.getColumnInfoForRawQuery (SqlManager.java:270) At org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery (SqlManager.java:241) at org.apache.sqoop.manager.SqlManager.getColumnTypesForQuery (SqlManager.java:234) at org.apache.sqoop.manager.ConnManager.getColumnTypes (ConnManager.java:304) at org.apache.sqoop.orm.ClassWriter.getColumnTypes (ClassWriter.java:1833) at org.apache.sqoop.orm.ClassWriter.generate (ClassWriter.java:1645) at org .apache.sqoop.tool.CodeGenTool.generateORM (CodeGenTool.java:107) at org.apache.sqoop.tool.ImportTool.importTable (ImportTool.java:478) at org.apache.sqoop.tool.ImportTool.run (ImportTool.java:605) at org.apache.sqoop.Sqoop.run (Sqoop.java:143) at org.apache.hadoop.util.ToolRunner.run (ToolRunner.java:70) at org.apache.sqoop.Sqoop. RunSqoop (Sqoop.java:179) at org.apache.sqoop.Sqoop.runTool (Sqoop.java:218) at org.apache.sqoop.Sqoop.runTool (Sqoop.java:227) at org.apache.sqoop.Sqoop.main (Sqoop.java:236) 10:51:30 on 15-09-17 ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: No columns to generate for ClassWriter at org.apache.sqoop.orm.ClassWriter.generate ( ClassWriter.java:1651) at org.apache.sqoop.tool.CodeGenTool.generateORM (CodeGenTool.java:107) at org.apache.sqoop.tool.ImportTool.importTable (ImportTool.java:478) at org.apache.sqoop.tool.ImportTool.run (ImportTool.java:605) at org.apache.sqoop.Sqoop.run (Sqoop.java:143) at org.apache.hadoop.util.ToolRunner.run (ToolRunner.java:70) At org.apache.sqoop.Sqoop.runSqoop (Sqoop.java:179) at org.apache.sqoop.Sqoop.runTool (Sqoop.java:218) at org.apache.sqoop.Sqoop.runTool (Sqoop.java:227) at org.apache.sqoop.Sqoop.main (Sqoop.java:236) Thank you for your reading The above is the content of "what to do if sqoop guides data Times database access from mysql to hive". After the study of this article, I believe you have a deeper understanding of what to do when sqoop guides data Times database access from mysql to hive, and the specific use still needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Data database guide what to do times learning tips hosts content that is location logs goals problems weird reasons ideas situations articles more Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL OPPO Reno vpn Shulou Information Shulou Technology