Created 11-06-2017 08:40 AM
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
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
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
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
Created 11-06-2017 01:08 PM
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
Created 11-06-2017 04:08 PM
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