Score:0

sqoop won't connect to mysql

pw flag

I am trying to connect Sqoop with Mysql. Before I asked this question I have tried all of the solutions I searched for, but nothing worked for me.

This is what I'm typing

/usr/local/hadoop/sqoop/lib$ sqoop list-databases --connect jdbc:mysql://localhost:3306/testDb --username Amel --password > Amel@-1998;

I do have a SQLConnector installed in /usr/local/hadoop/Sqoop/lib/ directory.

It's called: mysql-connector-java_8.0.25-1ubuntu20.04_all.deb I had installed the .deb file

this is the error that comes up everytime.

Warning: /usr/local/hadoop/sqoop/../hbase does not exist! HBase imports will fail.
Please set $HBASE_HOME to the root of your HBase installation.
Warning: /usr/local/hadoop/sqoop/../hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
Warning: /usr/local/hadoop/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
Warning: /usr/local/hadoop/sqoop/../zookeeper does not exist! Accumulo imports will fail.
Please set $ZOOKEEPER_HOME to the root of your Zookeeper installation.
21/07/09 20:48:11 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7
21/07/09 20:48:11 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
21/07/09 20:48:11 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
21/07/09 20:48:11 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.RuntimeException: Could not load db driver class: com.mysql.jdbc.Driver
java.lang.RuntimeException: Could not load db driver class: com.mysql.jdbc.Driver
    at org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:875)
    at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:59)
    at org.apache.sqoop.manager.CatalogQueryManager.listDatabases(CatalogQueryManager.java:57)
    at org.apache.sqoop.tool.ListDatabasesTool.run(ListDatabasesTool.java:49)
    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:234)
    at org.apache.sqoop.Sqoop.runTool(Sqoop.java:243)
    at org.apache.sqoop.Sqoop.main(Sqoop.java:252)
in flag
You cannot use the `root` MySQL account without `sudo`. If you need `sqoop` to have full access to the database engine, you will need to create an account with all privileges granted, and use that with `sqoop`.
Amel ha avatar
pw flag
I have granted all privileges to ROOT and it still gives me the same errors... I have been stuck on this error for 3 days :(
in flag
As I have already said, you **cannot** use `root`. This is a security issue because people generally use poor passwords, their MySQL databases get accessed by a malicious dolt, and all heck breaks loose. Do not use `root` with applications. Create a new MySQL account for the application with a decent password, and grant that new account the privileges required. `root` is for initial setup and emergency fixing only
Amel ha avatar
pw flag
hello Matigo! I have created a new user and granted all privileges. I have updated my result. I really need your help. Its day 4 stuck on this "Sqoop/MySql connection" problem
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.