Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

ambari-server start error

Solved Go to solution

ambari-server start error

Explorer

I am trying to install a non-default database for Ambari and have chosen MySQL as the non-default database on a Centos7 VM environment.

I have followed all the instructions on this link :

https://docs.hortonworks.com/HDPDocuments/Ambari-2.1.1.0/bk_ambari_reference_guide/content/_using_am...

I have installed the mysql connector using :

1. yum install mysql-connector-java and also tried using

2. downloading mysql-connector-java-5.1.46.tar.gz , copying the 2 mysql-connector-java-5.1.46.jar file to /usr/share/java as well as /var/lib/ambari-server/resources/ folder.

3. I also provided a symlink as mysql-connector-java.jar file both in the /usr/share/java as well as /var/lib/ambari-server/resources/ folder , I have also tried them seperately.

I have also added the property server.jdbc.driver.path=/usr/share.java/mysql-connector-java.jar to /etc/ambari-server/conf/ambari.properties

I have also created the ambari database, amabri user with all permission and also run the script - Ambari-DDL-MySQL-CREATE.sql

My ambari server version is 2.6.1.5.3 and my MySQL version is 5.6.40 MySQL Community Server (GPL)

I can access my MySQL and MySQL is running fine.

Despite trying all types of permutation and combination, I am getting this error after successfully installing ambari-server and ambari-setup. I have also tried ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar

But everytime I run the ambari-server start command I end with the following error.

ERROR [main] DBAccessorImpl:119 - Error while creating database accessor java.sql.SQLException: Access denied for user 'ambari'@'xxxx.com' (using password: YES)

Anyhelp would be greatly appreciated !

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: ambari-server start error

Mentor

@Guru Kamath

That's a permission issue on the ambari database, can you try running the following

grant all privileges on *.* to 'ambari'@'xxxx.com' identified by 'ambari_user_password';
flush privileges;

Please try that and revert

View solution in original post

5 REPLIES 5
Highlighted

Re: ambari-server start error

Mentor

@Guru Kamath

That's a permission issue on the ambari database, can you try running the following

grant all privileges on *.* to 'ambari'@'xxxx.com' identified by 'ambari_user_password';
flush privileges;

Please try that and revert

View solution in original post

Highlighted

Re: ambari-server start error

Explorer

USE ambaridb;

CREATE USER 'ambari'@'localhost' IDENTIFIED BY 'panther';

GRANT ALL PRIVILEGES ON *.* TO 'ambari'@'localhost';

CREATE USER 'ambari'@'%' IDENTIFIED BY 'panther';

GRANT ALL PRIVILEGES ON *.* TO 'ambari'@'%';

FLUSH PRIVILEGES;

Highlighted

Re: ambari-server start error

Explorer

I had created user ambari with all privileges.

Highlighted

Re: ambari-server start error

Mentor

@Guru Kamath

You will need explicitly add this privilege because that's the error being thrown out !!

grant all privileges on *.* to 'ambari'@'xxxx.com' identified by 'panther'; 
flush privileges;

Please do that and revert

Highlighted

Re: ambari-server start error

Explorer

Thank You ! That seems to have done the trick. Much appreciated

Don't have an account?
Coming from Hortonworks? Activate your account here