1.require : java环境,hadoop,hive ,mysql
2.下载解压sqoop1
3.设置环境变量
export SQOOP_HOME=/data/spark/bin/sqoop
export PATH=$PATH:$SQOOP_HOME/bin
4.添加mysql连接类
cp mysql-connector-java.jar $SQOOP_HOME/lib/
5.测试
sqoop import --connect jdbc:mysql://{host}/{db} --username {user} --password {password} --table item_info --hive-import