- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Access denied for user 'ambari'@localhost (using password: YES)
- Labels:
-
Apache Ambari
Created 11-06-2017 08:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm traying to install Ambari for my cluster HDP, while when I configured MYSQL to be the database for My Serveur Ambari and than Started Ambari Service i got this erreur:
ERROR - Unexpected error, database check failed com.google.inject.CreationException: Guice creation errors: 1) Error injecting constructor, java.lang.RuntimeException: java.sql.SQLException: Access denied for user 'ambari'@'10.166.2.206' (using password: YES) at org.apache.ambari.server.orm.DBAccessorImpl.<init>(DBAccessorImpl.java:83) at org.apache.ambari.server.orm.DBAccessorImpl.class(DBAccessorImpl.java:71) while locating org.apache.ambari.server.orm.DBAccessorImpl while locating org.apache.ambari.server.orm.DBAccessor for field at org.apache.ambari.server.orm.dao.DaoUtils.dbAccessor(DaoUtils.java:36)
Can someone explaine what wrong with My Ambari server Please
Created 11-06-2017 04:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think that i found the solution:
when i started the ambari installation, I stupidly change the default password which is bigdata to an other
So when the server goes to start it retrieve the password which is inside /etc/ambari-server/conf/password.dat in order to connect to Mysql which is obviously not the same.
I forced the change of the password in the path: /etc/ambari-server/conf/password.dat and then it works fine
thanks @Jay Kumar SenSharma
Created 11-06-2017 04:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for sharing the solution to check the password file first.
[root@sandbox ~]# cat /etc/ambari-server/conf/password.dat bigdata
Created 11-06-2017 10:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It looks like the GRANT for "ambari' user are not properly set inside the DB.
Can you please share the output of the following SQL query from the Database. You can login as "root" user inside the DB and then run the command;
mysql> select User,Password,Host from mysql.user;
.
Also update the "ambari" suer password using the following command:
mysql> UPDATE user SET Password=PASSWORD('bigdata') where USER='ambari'; mysql> FLUSH PRIVILEGES;
.
Created on 11-06-2017 10:52 AM - edited 08-18-2019 01:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Created 11-06-2017 01:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the above screenshot the "password" column for user "ambari" is Empty where the Host is "10.166.2.206" which should be set to password.
UPDATE user SET Password=PASSWORD('bigdata') where USER='ambari';
.
And then the Grant need to be provided to the user.
<br>mysql> use mysql; mysql> GRANT ALL PRIVILEGES ON *.* TO 'ambari'@'localhost'; mysql> GRANT ALL PRIVILEGES ON *.* TO 'ambari'@'s1xxxxxxxxxxxx'; <--- correct hostname mysql> GRANT ALL PRIVILEGES ON *.* TO 'ambari'@'10.166.2.206'; mysql> FLUSH PRIVILEGES;
Created 11-06-2017 01:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Created 11-06-2017 04:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think that i found the solution:
when i started the ambari installation, I stupidly change the default password which is bigdata to an other
So when the server goes to start it retrieve the password which is inside /etc/ambari-server/conf/password.dat in order to connect to Mysql which is obviously not the same.
I forced the change of the password in the path: /etc/ambari-server/conf/password.dat and then it works fine
thanks @Jay Kumar SenSharma
- « Previous
-
- 1
- 2
- Next »