Connecting Sqoop to MySQL
Issue
The user does not know how to connect Sqoop to MySQL.
Procedure
- Install the client in the cluster and check whether the MySQL driver package exists in the sqoop/lib directory of the client.
- Load environment variables in the client directory.
source bigdata_env
- Perform the Kerberos authentication.
If Kerberos authentication is not enabled for the cluster, skip this step. If it is enabled, run the following command to authenticate the current user:
kinit MRS cluster user
For example:
kinit admin
- Connect to the database.
sqoop list-databases --connect jdbc:mysql://IP:3306/ --username Username --password Password
An example is as follows.
The command output shows that Sqoop is successfully connected to the MySQL database.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.