Setup MySQL for Sqoop
To have MySQL working with Sqoop, there are few extras steps to perform.
First, we need to copy the mysql-connector-java.jar file to /var/lib/sqoop/ :
cd /usr/share/java/
sudo cp mysql-connector-java.jar /var/lib/sqoop/
If we want to use Sqoop within HUE, we also need to have a copy for the mysql-connector-java.jar file in HDFS:
hadoop fs -copyFromLocal mysql-connector-java.jar /user/ubuntu
Next we need to update the mysqld.cnf file in /etc/mysql/mysql.conf.d/:
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
Find the following line:
bind-address = 127.0.0.1
And comment it out:
#bind-address = 127.0.0.1
Save the modification and exit nano.
Now we can restart MySQL service using:
sudo service mysql restart