Sqoop import error: Access denied for user 'root'@'localhost' , even if rights are OK

Solution 1:

That's how Sqoop works. See the official doc.

If a table does not have a primary key defined and the --split-by is not provided, then import will fail unless the number of mappers is explicitly set to one with the --num-mappers 1 option or the --autoreset-to-one-mapper option is used. The option --autoreset-to-one-mapper is typically used with the import-all-tables tool to automatically handle tables without a primary key in a schema.