title: Remote access to mySql from sqoop
body: <p>I can connect to SQL instance on remote server through</p>
  
  <pre><code>mysql -h ServerIP -u root -p dbNamE
  </code></pre>
  
  <p>But as soon as I try to connect via Sqoop using the command:</p>
  
  <pre><code>sqoop list-tables --driver com.mysql.jdbc.Driver --connect jdbc:mysql://IP:port/dbName --username userName --password password
  </code></pre>
  
  <p>it throws this error:</p>
  
  <pre><code>16/05/06 16:46:46 ERROR manager.SqlManager: Error reading database metadata: java.sql.SQLException: Access denied for user 'root'@'IP' (using password: YES)
  java.sql.SQLException: Access denied for user 'root'@'IP' (using password: YES)
  at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
  at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597)
  at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529)
  at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:935)
  at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:4101)
  at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1300)
  at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2337)
  at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2370)
  at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2154)
  at com.mysql.jdbc.ConnectionImpl.&lt;init&gt;(ConnectionImpl.java:792)
  at com.mysql.jdbc.JDBC4Connection.&lt;init&gt;(JDBC4Connection.java:49)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
  at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
  at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:381)
  at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
  at java.sql.DriverManager.getConnection(DriverManager.java:664)
  at java.sql.DriverManager.getConnection(DriverManager.java:247)
  at org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:885)
  at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:52)
  at org.apache.sqoop.manager.SqlManager.listTables(SqlManager.java:520)
  at org.apache.sqoop.tool.ListTablesTool.run(ListTablesTool.java:49)
  at org.apache.sqoop.Sqoop.run(Sqoop.java:148)
  at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
  at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:184)
  at org.apache.sqoop.Sqoop.runTool(Sqoop.java:226)
  at org.apache.sqoop.Sqoop.runTool(Sqoop.java:235)
  at org.apache.sqoop.Sqoop.main(Sqoop.java:244)
  Could not retrieve tables list from server
  16/05/06 16:46:46 ERROR tool.ListTablesTool: manager.listTables() returned null
  </code></pre>
  
  <p>Can I get some clarification on this?</p>
  
  <p>How do I fix this?</p>