Support Questions

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

how to access mysql in hadoop VM from host machine?


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)                   

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:

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

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..

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

New Contributor


used cmd like 


mysql -u root -p cloudera