1-844-696-6465 (US)        +91 77600 44484        help@dezyre.com

Sqoop -MqSQL



0
While Granting the permission to Cluster IP - I am getting the warning not sure whether the command executed or not.
VMWare IP - 192.168.25.129

GRANT ALL PRIVILEGES ON *.* TO root@192.168.25.129 IDENTIFIED BY '' WITH GRANT OPTION;


'Warning', '1287', 'Using GRANT statement to modify existing user\'s properties other than privileges is deprecated and will be removed in future release. Use ALTER USER statement for this operation.'


Also When I do cmd on my local machine I do not get the IP of my MySQL server. In Sqoop command do I need to use IP of Virtual Machine or MySQL server.


Also when I execute the below sqoop command.... getting error.

sqoop export --connect jdbc:mysql://192.168.25.129/dezyre --table player --username root -P --export-dir /user/cloudera/sqoopOut2/ -m 1

[cloudera@localhost sqoop]$ sqoop export --connect jdbc:mysql://192.168.25.129/dezyre --table player --username root -P --export-dir /user/cloudera/sqoopOut2/ -m 1
Enter password:
15/11/01 10:12:59 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
15/11/01 10:12:59 INFO tool.CodeGenTool: Beginning code generation
15/11/01 10:13:01 ERROR manager.SqlManager: Error executing statement: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure


2 Answer(s)


0

hi Manish,

Are you able to manually login to mysql using the username/password?

0

Hi Manish,
Try to login manually, if success then follow below link, if fails check and write correct username and password.

http://doc.coker.com.au/computers/mysql-cheat-sheet/
or
you can follow the below steps:
- To grant all access to a new database:
CREATE DATABASE foo_db;
USE foo_db;
GRANT ALL PRIVILEGES ON foo_db.* to 'user'@'10.1.2.3' IDENTIFIED BY 'pass';

Where 10.1.2.3 is the client address and pass is the password. Replace 10.1.2.3 with % if you want to allow access from any client address.

Note that if you use “foo_db” instead of “foo_db.*” then you will end up granting access to foo_db.foo_db (a table named foo_db in the foo_db database) which generally is not what you want.

To grant read-only access replace “ALL PRIVILEGES” with “SELECT“.

To show what is granted to the current user run “SHOW GRANTS;” .

To show the privs for a particular user run “SHOW GRANTS FOR ‘user’@’10.1.2.3’;”

To show all entries in the user table (user-name, password, and hostname):
USE mysql;
SELECT Host,User,Password FROM user;

To do the same thing at the command-line:
echo “SELECT Host,User,Password FROM user;” | mysql mysql

To revoke access:
REVOKE ALL PRIVILEGES ON foo_db.* FROM user@10.1.2.3 IDENTIFIED BY ‘pass’;

To test a user’s access connect as the user with a command such as the following:
mysql -u user -h 10.1.2.4 -p foo_db

Then test that the user can create tables with the following mysql commands:
CREATE TABLE test (id INT);
DROP TABLE test;

Your Answer

Click on this code-snippet-icon icon to add code snippet.

Upload Files (Maximum image file size - 1.5 MB, other file size - 10 MB, total size - not more than 50 MB)

Email
Password