Updated on 2026-10-21 GMT+08:00

Connecting Sqoop to MySQL

Issue

The user does not know how to connect to a MySQL database.

Procedure

  1. Install the client in the cluster and check whether the MySQL driver package exists in the sqoop/lib directory of the client.

  2. Load environment variables in the client directory.

    source bigdata_env

  3. Perform Kerberos user authentication.

    If Kerberos authentication is enabled for the cluster, run the following command to authenticate the user who has the operation permission. Otherwise, skip this step.

    kinit MRS cluster user

  4. Connect to the database.

    sqoop list-databases --connect jdbc:mysql://Database IP address:3306/ --username Database login username -P

    The command output shows that Sqoop is successfully connected to the MySQL database.