Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

how to access mysql in hadoop VM from host machine?

avatar
Contributor

Hello guys,

I am newbie to hadoop. I have installed sandbox vmware and now i want to access mysql DB which is installed in my host machine into hive through sqoop. after writing following command

mysql -u root -p

I am getting following error. any help?

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)                   
13 REPLIES 13

avatar
Master Mentor

@Inam Ur Rehman

Unlike your original query which was related to Sandbox based mysql (that uses 'hadoop' as root user password by default) , Your current query is very specific to MySQL instead of HDP Sandbox specific settings.

You should refer to standard MySQL documentation in order to know how to reset the root passwords: https://dev.mysql.com/doc/refman/5.7/en/resetting-permissions.html

- If you will use default sandbox then the mysql root user password will be 'hadoop'.

avatar
New Contributor

the thing is that you have a passed your localhosts to your VM sandbox. the sandbox itselfs contains its own mysql instance. within sqoop you are not pointing to the mysql on your windows but on your vm..

avatar
New Contributor

but i am looking to the same solution to bypass this issue. How can i access my local mysql instance on windows when running sqoop on a VM box

avatar
New Contributor

HI,

used cmd like 

 

mysql -u root -p cloudera