HOWTO: Install the Latest MySQL on a Linux Target

ISSUE:

hcat requires some sort of persistent db to store schema information

SOLUTION 1: Specific host access only

grab the latest package

> yum -y install mysql-server

configure autostart at boot

> chkconfig mysqld on
> service mysqld start

run the mysql client

> mysql -u root -p

enter your password

mysql> CREATE USER 'my_user_id'@'host' IDENTIFIED BY 'pw';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'hcatre'@'host' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;

exit the client

mysql> exit;

test the new account

mysql -h host_FQDN -u my_user_id -p

You should now be logged into the mysql client as the new user

If you get: Error … Can’t connect ot MySQL server on …

log into the mysql host and assume root

iptables -A INPUT -i eth0 -p tcp -m tcp --dport 3306 -j ACCEPT
service iptables save
service iptables restart

Test from hcat server machine

shell into the hcat server

mysql -h host -u my_user -p

*verify you can log in from the hcat host

Test from Hive

Run the Hive shell:

#hive --config /etc/hcatalog
hive> show tables;

Thank you for subscribing!