Support Questions
Find answers, ask questions, and share your expertise

How to start mySQL in HDPCDeveloper_2.2 PracticeExam instance?

Is mySQL already installed on HDPCD Practice Exam instance? if yes, How to start mySQL in HDPCD Practice Exam instance?

1 ACCEPTED SOLUTION

Accepted Solutions

Guru

You need to ssh onto the namenode first:

ssh root@namenode  (password is hadoop)

No need to start mysqld on the namenode - it's already running. You can view what's in the DB by running mysql:

# mysql --user root -p

Password is "hadoop". Let me know if that works.

View solution in original post

14 REPLIES 14

@Ramesh Egamamidi

service mysqld start

or

/etc/init.d/mysqld start

Thanks for your response Neeraj.

I tried and getting the following error:

>>service mysqld start

mysqld : unrecognized service

>>/etc/init.d/mysqld start :

bash: /etc/init.d/mysqld: No such file or directory.

Any other alternate?

@Ramesh Egamamidi

I guess mysql is not part of the AMI. Why do you need mysql?

yum install mysql-* (not sure if it's going to work in practice exam)

Guru

You need to ssh onto the namenode first:

ssh root@namenode  (password is hadoop)

No need to start mysqld on the namenode - it's already running. You can view what's in the DB by running mysql:

# mysql --user root -p

Password is "hadoop". Let me know if that works.

View solution in original post

Hi Rich,

I tried the steps provided by you and got the following error : ERROR 2002(HY000) : Can't connect to local MySQL server thorugh socket 'var/lib/MySQL/MySQL.scok' (111)

Thanks,

Ramesh

Guru

Send me the public dns of your instance. Email it to certification@hortonworks.com. I'll take a look

Mentor

Hi Ramesh,

First check your mysql.sock If your file my.cnf (usually in the /etc/mysql/ folder) is correctly configured with socket=/var/lib/mysql/mysql.sock

Then check if mysql is running with the following command:

#mysqladmin -u root -p status

Try changing your permission to mysql folder. If you are working locally, you can try:

# chmod -R 755 /var/lib/mysql/

Start the MySQL

# service mysqld start or /etc/init.d/mysqld start

Or if There no MySQl the you need to install first

# yum install mysql mysql-server

Enable the MySQL service:

#/sbin/chkconfig mysqld on

Start the MySQL server:

#/sbin/service mysqld start

afterwards set the MySQL root password:

#mysqladmin -u root password 'new-password' (with the quotes)

Guru

Let me make a comment for anyone reading this who is attempting the practice exam: mysqld is already running on the namenode and you do not need to start it. If you want to connect to mysql, follow the instructions I provided below. It is possible that mysqld may have stopped, but very unlikely.

If you are having problems with the Sqoop tasks, make sure your connection URL is correct. Look in /home/horton/solutions for the correct URL.