[Hadoop] SQOOP 설치

Use_Silver·2022년 2월 4일
0

하둡

목록 보기
10/12

[hadoop@hadoop00 lib]$ cp ./mysql-connector-java-5.1.38-bin.jar $SQOOP_HOME/lib
[hadoop@hadoop00 lib]$
[hadoop@hadoop00 lib]$ CD $SQOOP_HOME/lib
-bash: CD: command not found
[hadoop@hadoop00 lib]$ cd $SQOOP_HOME/lib
[hadoop@hadoop00 lib]$ ls my*
mysql-connector-java-5.1.38-bin.jar
[hadoop@hadoop00 lib]$

이렇게 나오면 성공

sqoop eval --driver "com.mysql.jdbc.Driver" --connect "jdbc:mysql://localhost:3306" --query "select * from fruits_db.fruits" --username "root" --password "1234"

hdfs dfs -ls -R /user/hadoop

hdfs dfs -cat /user/hadoop/sqoopdata/fruits/part-m-0000*

localhost:8088

sqoop export --connect "jdbc:mysql://localhost:3306/fruits_db" --table fruits2 --username "root" --password "1234" --export-dir /user/hadoop/sqoopdata/fruits

참조:
https://sqoop.apache.org/docs/1.4.6/SqoopUserGuide.html

profile
과정은 힘들지만😨 성장은 즐겁습니다🎵

0개의 댓글