- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How To connect with mysql in HDPCDeveloper Practice exam instance
- Labels:
-
Apache Hadoop
Created ‎05-11-2016 01:51 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I was trying to connect with mysql to check databases.. as mysql is already running in namenode
I have used following command
mysql --user root -p and got following error
ERROR 2002(HY000) : Can't connect to local MySQL server thorugh socket 'var/lib/MySQL/MySQL.scok' (2)
Created ‎05-13-2016 02:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Shikha Verma - The MySQL instance is running on a machine called "namenode", not localhost. If you want to run the mysql client, you should SSH onto namenode first:
$ ssh root@namenode
The password is "hadoop".
Once you are on the namenode, then you can run mysql:
# mysql --user root -p
That password is also "hadoop". Let me know if that works.
Created ‎05-11-2016 02:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
By not specifying the hostname, you are attempting to connect to "localhost". When you connect to "localhost", the socket connector is used, which doesn't look like it was configured properly. To use the TCP/IP connector, you should connect to mysql using the hostname:
mysql --host your.hostname.goes.here --user root -p
Created ‎05-12-2016 11:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Shikha Verma - did this answer help? If so, please accept. Otherwise, let me know if you need further assistance.
Created ‎05-13-2016 02:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Shikha Verma - The MySQL instance is running on a machine called "namenode", not localhost. If you want to run the mysql client, you should SSH onto namenode first:
$ ssh root@namenode
The password is "hadoop".
Once you are on the namenode, then you can run mysql:
# mysql --user root -p
That password is also "hadoop". Let me know if that works.
Created ‎05-24-2016 11:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks ..it worked
