sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject svn commit: r1185776 - /incubator/sqoop/trunk/src/docs/user/troubleshooting.txt
Date Tue, 18 Oct 2011 18:17:46 GMT
Author: blee
Date: Tue Oct 18 18:17:46 2011
New Revision: 1185776

URL: http://svn.apache.org/viewvc?rev=1185776&view=rev
SQOOP-366 Sqoop User Guide's troubleshooting section should include MySQL setup instructions

(Kate Ting via Bilung Lee)


Modified: incubator/sqoop/trunk/src/docs/user/troubleshooting.txt
URL: http://svn.apache.org/viewvc/incubator/sqoop/trunk/src/docs/user/troubleshooting.txt?rev=1185776&r1=1185775&r2=1185776&view=diff
--- incubator/sqoop/trunk/src/docs/user/troubleshooting.txt (original)
+++ incubator/sqoop/trunk/src/docs/user/troubleshooting.txt Tue Oct 18 18:17:46 2011
@@ -171,3 +171,45 @@ at com.cloudera.sqoop.Sqoop.main(Sqoop.j
 it was created with mixed/lower case within quotes).
 . Specify the table name, which you are working with, in upper case (unless
 it was created with mixed/lower case within quotes).
+MySQL: Connection Failure
+Problem: While importing a MySQL table into Sqoop, if you do not have
+the necessary permissions to access your MySQL database over the network,
+you may get the below connection failure.
+Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
+Solution: First, verify that you can connect to the database from the node where
+you are running Sqoop:
+$ mysql --host=<IP Address> --database=test --user=<username> --password=<password>
+If this works, it rules out any problem with the client network configuration
+or security/authentication configuration.
+Add the network port for the server to your my.cnf file +/etc/my.cnf+:
+port = xxxx
+Set up a user account to connect via Sqoop.
+Grant permissions to the user to access the database over the network:
+(1.) Log into MySQL as root +mysql -u root -p<ThisIsMyPassword>+.
+(2.) Issue the following command:
+mysql> grant all privileges on test.* to 'testuser'@'%' identified by 'testpassword'
+Note that doing this will enable the testuser to connect to the
+MySQL server from any IP address. While this will work, it is not
+advisable for a production environment. We advise consulting with your
+DBA to grant the necessary privileges based on the setup topology.
+If the database server's IP address changes, unless it is bound to
+a static hostname in your server, the connect string passed into Sqoop
+will also need to be changed.

View raw message