1
votes

Version: Horton works Sandbox 2.6.5_1 on Virtual box After install could not find mysql root password so reset mysql root password. Before password reset hive was working, now hive metastore not starting.

Access denied for user 'root'@'sandbox-hdp.hortonworks.com' (using password: YES) ... Writing File['/usr/hdp/current/hive-metastore/conf/conf.server/hive-site.jceks'] because contents don't match.

I changed mysql root password to 'hive','bigdata','hadoop' still i could not start hive metastore.

3

3 Answers

3
votes
  • First time login password for hortonworks HDP is 'hortonworks1'
  • It can be change using below steps:-

Step 1:

systemctl stop mysqld

Step 2:-

systemctl set-environment MYSQLD_OPTS="--skip-grant-tables"

Step 3:-

systemctl start mysqld

Step4:-

mysql -u root

Step 5:-

FLUSH PRIVILEGES;

Step 6:-

ALTER USER 'root'@'localhost' IDENTIFIED BY 'devesh';

Step 7:-

FLUSH PRIVILEGES;
quit;
systemctl stop mysqld

Step 8 (Final Step):- Unset the mySQL envitroment option so it starts normally next time

systemctl unset-environment MYSQLD_OPTS
systemctl start mysqld

Now you can login to mysql using password 'devesh'

1
votes

Default mysql root password is 'hortonworks1'. After changing to this default password, hive metastore works fine.

But still don't know if we change mysql root password where to change the connection password.

0
votes

Try doing one thing:

  1. Log in to the machine as root
  2. Type mysql only; if it says Access Denied(using password:YES); Check if the mysql service is running or not
  3. How to check; systemctl status mysqld OR if you have mariaDB installed then; systemctl status mariadb
  4. If not active, start mysql and try logging in again.
  5. If you fail to login then run the command; mysqladmin -u root password <your_password>
  6. Login with the root to mysql now and then type the command; select host,user,password from mysql.user
  7. Check if there is a password set for hive user; if not then follow the hortonworks doc to install hive with mysql.

P.S: Don't forget to use ; after every mysql command.