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

Ranger Admin install fails with Access Denied error

Explorer

I am seeing the following when it is trying to install Ranger Admin on the Ranger host server:

2016-01-27 08:48:59,962  [I] Database ranger already exists.
2016-01-27 08:48:59,962  [I] ---------- Granting permission to Ranger Admin db user ----------
2016-01-27 08:48:59,962  [I] ---------- Granting privileges TO user 'rangeradmin'@'%' on db 'ranger'----------
SQLException : SQL state: 42000 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Access denied for user 'root'@'hostname' to database 'ranger' ErrorCode: 1044
SQLException : SQL state: 42000 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Access denied for user 'root'@'hostname' to database 'ranger' ErrorCode: 1044
2016-01-27 08:49:00,520  [E] Granting privileges to 'rangeradmin' failed on 'ranger'

I have logged onto MySQL on the host machine and granted the following privileges and still the installation throws Access Denied error.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Ranger Admin install fails with Access Denied error

@Kay Aries

Try this

grant all privileges on *.* to 'root'@'host' identified by 'password' with grant option;

then restart/reinstall rangeradmin process

View solution in original post

12 REPLIES 12

Re: Ranger Admin install fails with Access Denied error

What privileges did you grant? I think there is something missing in your post

Re: Ranger Admin install fails with Access Denied error

Explorer

Something like this:

GRANT ALL ON mydb.*TO'myuser'@'%';

Re: Ranger Admin install fails with Access Denied error

Expert Contributor

Try this:

GRANT ALL PRIVILEGES ON *.* TO 'root'@'hostname' WITH GRANT OPTION;

Re: Ranger Admin install fails with Access Denied error

Mentor

@Kay Aries you have MySQL issue not a ranger issue. Please see this Thread

Re: Ranger Admin install fails with Access Denied error

@Kay Aries

Try this

grant all privileges on *.* to 'root'@'host' identified by 'password' with grant option;

then restart/reinstall rangeradmin process

View solution in original post

Re: Ranger Admin install fails with Access Denied error

Explorer

Ranger is in this state now:

Invalid event: HOST_SVCCOMP_OP_IN_PROGRESS at INSTALL_FAILED

I will delete the service through Rest API and will try it again.

Thanks for all the help.

Re: Ranger Admin install fails with Access Denied error

Explorer

I did a re-install and Neeraj's solution worked for me. Thank you all, guys.

Re: Ranger Admin install fails with Access Denied error

New Contributor

Thanks Neeraj...your solution worked

Re: Ranger Admin install fails with Access Denied error

Explorer

It worked for me when used with "identified by 'password' " string in grant all privileges on *.* to 'root'@'oozie-test2' identified by 'password' with grant option;