<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Ranger: Access denied for user 'rangeradmin'@'localhost' in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Ranger-Access-denied-for-user-rangeradmin-localhost/m-p/200484#M162505</link>
    <description>&lt;P&gt;I followed the instructions (https://cwiki.apache.org/confluence/display/RANGER/Ranger+Installation+Guide) to install Ranger admin and usersync for evaluation. Ranger admin UI is up.&lt;/P&gt;&lt;P&gt;Also followed the instructions at &lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.1/bk_security/content/configuring_mysql_for_ranger.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.1/bk_security/content/configuring_mysql_for_ranger.html&lt;/A&gt; to setup MySQL server and create/grant permissions to necessary users. MySQL is running on the same machine as Ranger admin and usersync.&lt;/P&gt;&lt;P&gt;Granted the same permissions to user rangeradmin as well. &lt;/P&gt;&lt;P&gt;However, I see a flurry of following errors in /usr/local/mysql/data/mysqld.local.err:&lt;/P&gt;&lt;P&gt;2017-07-27T05:50:37.759668Z 1389 [Note] Access denied for user 'rangeradmin'@'localhost' (using password: YES) &lt;/P&gt;&lt;P&gt;2017-07-27T05:50:37.759669Z 1390 [Note] Access denied for user 'rangeradmin'@'localhost' (using password: YES) &lt;/P&gt;&lt;P&gt;2017-07-27T05:50:38.762447Z 1392 [Note] Access denied for user 'rangeradmin'@'localhost' (using password: YES)&lt;/P&gt;&lt;P&gt;[...]&lt;/P&gt;&lt;P&gt;I am able to connect to MySQL as 'rangeradmin' using MySQL's command line client. Not sure why Ranger admin is not able to connect.&lt;/P&gt;&lt;P&gt;Also, I am _not_ able to login to Ranger admin UI. It displays "Unable to connect to DB..." error. Any pointers to debug?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jul 2017 12:56:47 GMT</pubDate>
    <dc:creator>ameyasakhalkar</dc:creator>
    <dc:date>2017-07-27T12:56:47Z</dc:date>
    <item>
      <title>Ranger: Access denied for user 'rangeradmin'@'localhost'</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ranger-Access-denied-for-user-rangeradmin-localhost/m-p/200484#M162505</link>
      <description>&lt;P&gt;I followed the instructions (https://cwiki.apache.org/confluence/display/RANGER/Ranger+Installation+Guide) to install Ranger admin and usersync for evaluation. Ranger admin UI is up.&lt;/P&gt;&lt;P&gt;Also followed the instructions at &lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.1/bk_security/content/configuring_mysql_for_ranger.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.1/bk_security/content/configuring_mysql_for_ranger.html&lt;/A&gt; to setup MySQL server and create/grant permissions to necessary users. MySQL is running on the same machine as Ranger admin and usersync.&lt;/P&gt;&lt;P&gt;Granted the same permissions to user rangeradmin as well. &lt;/P&gt;&lt;P&gt;However, I see a flurry of following errors in /usr/local/mysql/data/mysqld.local.err:&lt;/P&gt;&lt;P&gt;2017-07-27T05:50:37.759668Z 1389 [Note] Access denied for user 'rangeradmin'@'localhost' (using password: YES) &lt;/P&gt;&lt;P&gt;2017-07-27T05:50:37.759669Z 1390 [Note] Access denied for user 'rangeradmin'@'localhost' (using password: YES) &lt;/P&gt;&lt;P&gt;2017-07-27T05:50:38.762447Z 1392 [Note] Access denied for user 'rangeradmin'@'localhost' (using password: YES)&lt;/P&gt;&lt;P&gt;[...]&lt;/P&gt;&lt;P&gt;I am able to connect to MySQL as 'rangeradmin' using MySQL's command line client. Not sure why Ranger admin is not able to connect.&lt;/P&gt;&lt;P&gt;Also, I am _not_ able to login to Ranger admin UI. It displays "Unable to connect to DB..." error. Any pointers to debug?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 12:56:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ranger-Access-denied-for-user-rangeradmin-localhost/m-p/200484#M162505</guid>
      <dc:creator>ameyasakhalkar</dc:creator>
      <dc:date>2017-07-27T12:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: Ranger: Access denied for user 'rangeradmin'@'localhost'</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ranger-Access-denied-for-user-rangeradmin-localhost/m-p/200485#M162506</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/24202/ameyasakhalkar.html" nodeid="24202"&gt;@Ameya Sakhalkar&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Looks like the grant is still not set correctly. Can you please share the output of the following SQL:&lt;/P&gt;&lt;PRE&gt;# mysql -u rangeradmin -p -h localhost
mysql&amp;gt; select user, host from user where user like 'ranger%' ;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Or connect to Mysql as root and then run.&lt;/P&gt;&lt;PRE&gt;mysql&amp;gt; SHOW GRANTS FOR 'rangeradmin'@'localhost';
mysql&amp;gt; GRANT ALL ON *.* TO 'rangeradmin'@'localhost' WITH GRANT OPTION;
mysql&amp;gt; FLUSH PRIVILEGES;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 13:04:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ranger-Access-denied-for-user-rangeradmin-localhost/m-p/200485#M162506</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-07-27T13:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: Ranger: Access denied for user 'rangeradmin'@'localhost'</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ranger-Access-denied-for-user-rangeradmin-localhost/m-p/200486#M162507</link>
      <description>&lt;P&gt;Sure. Please find it below.&lt;/P&gt;&lt;PRE&gt;mysql&amp;gt; use mysql;
Database changed
mysql&amp;gt; select user, host from user where user like 'ranger%' ;
+-------------+-----------+
| user        | host      |
+-------------+-----------+
| rangeradmin | %         |
| rangerdba   | %         |
| rangeradmin | localhost |
| rangerdba   | localhost |
+-------------+-----------+
4 rows in set (0.00 sec)

&lt;/PRE&gt;</description>
      <pubDate>Thu, 27 Jul 2017 13:12:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ranger-Access-denied-for-user-rangeradmin-localhost/m-p/200486#M162507</guid>
      <dc:creator>ameyasakhalkar</dc:creator>
      <dc:date>2017-07-27T13:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: Ranger: Access denied for user 'rangeradmin'@'localhost'</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ranger-Access-denied-for-user-rangeradmin-localhost/m-p/200487#M162508</link>
      <description>&lt;P&gt;can you please try following command on your database:&lt;/P&gt;&lt;P&gt;GRANT ALL ON *.* TO 'rangeradmin'@'localhost' identified by "&amp;lt;rangeradmin_password&amp;gt;" WITH GRANT OPTION;&lt;/P&gt;&lt;P&gt;flush privileges;&lt;/P&gt;&lt;P&gt;and then restart the ranger&lt;/P&gt;&lt;P&gt;Note: another thing it is better to provide root credentials , then at the time of installation it will connect through root and will take care of doing creation of rangeradmin database and configuring it&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 13:26:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ranger-Access-denied-for-user-rangeradmin-localhost/m-p/200487#M162508</guid>
      <dc:creator>dsharma</dc:creator>
      <dc:date>2017-07-27T13:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Ranger: Access denied for user 'rangeradmin'@'localhost'</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ranger-Access-denied-for-user-rangeradmin-localhost/m-p/200488#M162509</link>
      <description>&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/505/dsharma.html" nodeid="505"&gt;@Deepak Sharma&lt;/A&gt;. Followed the steps, however, still getting "Access denied" error.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 15:57:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ranger-Access-denied-for-user-rangeradmin-localhost/m-p/200488#M162509</guid>
      <dc:creator>ameyasakhalkar</dc:creator>
      <dc:date>2017-07-27T15:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Ranger: Access denied for user 'rangeradmin'@'localhost'</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ranger-Access-denied-for-user-rangeradmin-localhost/m-p/200489#M162510</link>
      <description>&lt;P&gt;did you replace the correct password and host in the command?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 18:43:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ranger-Access-denied-for-user-rangeradmin-localhost/m-p/200489#M162510</guid>
      <dc:creator>dsharma</dc:creator>
      <dc:date>2017-07-27T18:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: Ranger: Access denied for user 'rangeradmin'@'localhost'</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ranger-Access-denied-for-user-rangeradmin-localhost/m-p/200490#M162511</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/24202/ameyasakhalkar.html"&gt;Ameya Sakhalkar &lt;/A&gt;&lt;/P&gt;&lt;P&gt;Just  run this it should work while logged on as root  MySQL,make sure you are connected to the ranger database &lt;/P&gt;&lt;PRE&gt;grant all on rangeradmin.* to ranger;
Flush privileges;&lt;/PRE&gt;</description>
      <pubDate>Thu, 27 Jul 2017 22:34:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ranger-Access-denied-for-user-rangeradmin-localhost/m-p/200490#M162511</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2017-07-27T22:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: Ranger: Access denied for user 'rangeradmin'@'localhost'</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ranger-Access-denied-for-user-rangeradmin-localhost/m-p/200491#M162512</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/505/dsharma.html" nodeid="505"&gt;@Deepak Sharma&lt;/A&gt;, yes I did. Is there anything else I need to try out?&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jul 2017 18:15:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ranger-Access-denied-for-user-rangeradmin-localhost/m-p/200491#M162512</guid>
      <dc:creator>ameyasakhalkar</dc:creator>
      <dc:date>2017-07-29T18:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: Ranger: Access denied for user 'rangeradmin'@'localhost'</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ranger-Access-denied-for-user-rangeradmin-localhost/m-p/200492#M162513</link>
      <description>&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/1271/sheltong.html" nodeid="1271"&gt;@Geoffrey Shelton Okot&lt;/A&gt;, but its failing in spite of this&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jul 2017 18:16:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ranger-Access-denied-for-user-rangeradmin-localhost/m-p/200492#M162513</guid>
      <dc:creator>ameyasakhalkar</dc:creator>
      <dc:date>2017-07-29T18:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: Ranger: Access denied for user 'rangeradmin'@'localhost'</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ranger-Access-denied-for-user-rangeradmin-localhost/m-p/200493#M162514</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/24202/ameyasakhalkar.html"&gt;Ameya Sakhalkar&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Don't worry you can create a new Ranger database  as follow change username and password to suit your environment. &lt;/P&gt;&lt;PRE&gt;mysql -u root -p{rootpassword}

CREATE USER 'ranger'@'localhost' IDENTIFIED BY 'ranger_password';
GRANT ALL PRIVILEGES ON *.* TO 'ranger'@'localhost';
GRANT ALL PRIVILEGES ON *.* TO 'ranger'@'rangerDBhost';
GRANT ALL PRIVILEGES ON *.* TO 'ranger'@'%';
GRANT ALL PRIVILEGES ON *.* TO 'ranger'@'localhost' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'ranger'@'rangerDBhost' IDENTIFIED BY 'ranger' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'ranger'@'localhost' IDENTIFIED BY 'ranger_password' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'ranger'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
# mysql -u ranger -pranger
CREATE DATABASE ranger;

################ simpler version ###################
create database ranger;
create user ranger identified by 'ranger';
grant all on ranger.* to ranger;
Flush privileges;&lt;/PRE&gt;&lt;P&gt;Let me know if that helps &lt;/P&gt;</description>
      <pubDate>Sun, 30 Jul 2017 06:09:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ranger-Access-denied-for-user-rangeradmin-localhost/m-p/200493#M162514</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2017-07-30T06:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: Ranger: Access denied for user 'rangeradmin'@'localhost'</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ranger-Access-denied-for-user-rangeradmin-localhost/m-p/200494#M162515</link>
      <description>&lt;P&gt;Thanks a ton &lt;A rel="user" href="https://community.cloudera.com/users/1271/sheltong.html" nodeid="1271"&gt;@Geoffrey Shelton Okot&lt;/A&gt;. It worked. &lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 23:02:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ranger-Access-denied-for-user-rangeradmin-localhost/m-p/200494#M162515</guid>
      <dc:creator>ameyasakhalkar</dc:creator>
      <dc:date>2017-07-31T23:02:44Z</dc:date>
    </item>
  </channel>
</rss>

