#if [ ! -d "${HBASE_HOME}" ];then
# echo "Error: $HBASE_HOME does not exist!"
# echo 'Please set $HBASE_HOME to the root of your HBase installation.'
# exit 1
#fi
#if [ ! -d "${ZOOKEEPER_HOME}" ]; then
# echo "Error: $ZOOKEEPER_HOME does not exist!"
# echo 'Please set $ZOOKEEPER_HOME to the root of your ZooKeeperinstallation.'
# exit 1
#fi
3)创建sqoop库,平且授权:
mysql> GRANT ALL PRIVILEGES ON sqoop.* TO 'sqoop'@'172.16.41.%' identified by 'routon' with grant option;
mysql> flush privileges;
4)创建students表,并且插入数据:
mysql> create table students (id int not null primary key, name varchar(20), age int);
插入测试数据:
1
2
3
4
5
insert into studentsvalues('001','abc',29);
insert into students values('002','def',28);
insert into students values('003','aaaa',26);
insert into students values('004','efsaz',60);
insert into students values('005','kiass',63);
表中数据为:
mysql> select * from students;
+----+-------+------+
| id | name | age |
+----+-------+------+
| 2 | def | 28 |
| 3 | aaaa | 26 |
| 4 | efsaz | 60 |
| 5 | kiass | 63 |
+----+-------+------+
4 rows in set (0.00 sec)