Help Center/ MapReduce Service/ User Guide/ Configuring Storage-Compute Decoupling for an MRS Cluster/ FAQ About Decoupled Storage and Compute/ What Should I Do If the MySQL Driver Package Is Missing When Data Is Imported or Exported Using Sqoop?
Updated on 2025-08-11 GMT+08:00

What Should I Do If the MySQL Driver Package Is Missing When Data Is Imported or Exported Using Sqoop?

Symptom

The error message "Could not load db driver class: com.mysql.jdbc.Driver" is displayed when the sqoop import or sqoop export command is executed, as shown in Figure 1. This indicates that the MySQL driver package is missing.

Figure 1 Missing MySQL driver package error

Procedure

Download the MySQL driver package from the MySQL official website https://downloads.mysql.com/archives/c-j/, decompress the package, upload it to the Client installation directory/Sqoop/sqoop/lib directory, and run the Sqoop command to import or export data.