i did all that and i ran ambari-setup once again and i gave the remote MySQL DB information by choosing option 3 for MySQL and tried to restart but it failed to restart again with the following error message .. which means it is trying to talk to a DB on the local host which doesn't exisits .. the remote mysql is running on FALBDCDQ0007V host ..
Exception in thread "main" com.google.inject.CreationException: Guice creation errors: 1) Error injecting constructor, java.lang.RuntimeException: java.sql.SQLException: Access denied for user 'ambari'@'FALBDCDQ0001V.farmersinsurance.com' (using password: YES) at org.apache.ambari.server.orm.DBAccessorImpl.<init>(DBAccessorImpl.java:77) 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) at org.apache.ambari.server.orm.dao.DaoUtils.class(DaoUtils.java:36) while locating org.apache.ambari.server.orm.dao.DaoUtils for field at org.apache.ambari.server.orm.dao.TopologyRequestDAO.daoUtils(TopologyRequestDAO.java:31) at org.apache.ambari.server.orm.dao.TopologyRequestDAO.class(TopologyRequestDAO.java:31) while locating org.apache.ambari.server.orm.dao.TopologyRequestDAO for field at org.apache.ambari.server.topology.PersistedStateImpl.topologyRequestDAO(PersistedStateImpl.java:56) Caused by: java.lang.RuntimeException: java.sql.SQLException: Access denied for user 'ambari'@'FALBDCDQ0001V.farmersinsurance.com' (using password: YES) at org.apache.ambari.server.orm.DBAccessorImpl.<init>(DBAccessorImpl.java:103) at org.apache.ambari.server.orm.DBAccessorImpl$$FastClassByGuice$$86dbc63e.newInstance(<generated>) at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40) at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:60) at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85) at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254) at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:54) at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:53) at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:110) at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:94)
I have attached a document on how to install your Ambari server successfully you will not find any better document than this .Please enjoy and revert set-up-mysql-for-ambari.pdf
I forgot to include the syntax to connect remotely to MySQL server but it should be fine
The Ambari Server host needs the mysql-connector-java driver installed to be able to communicate with the database you will need to install it on the local and remote server
Thanks for sending the doc but I did the installation exactly the same way you have it on your document and everything went fine but when i start the server it is looking for the local mySQL db which doesnt exists .. I checked ambari.properties and everything points to the remote mySQL server but for some reason the ambari server is trying to connect to the local mysql host ..
Please note that i m doing the installation using a local repo as this cluster doesnt have internet connect .. Do you have a doc to remove ambari binaries and configuration from everywhere to start from the scratch?
You are mixing couple of things here.
2) ambari-server setup looks fine...as per the screenshot
whats the exact issue now?
@rbalam It failed because of permission issue
java.sql.SQLException: Access denied for user 'ambari'@'FALBDCDQ0001V.farmersinsurance.com' (using
run this as root user
grant all privileges on *.* to 'ambari'@'FALBDCDQ0001V.farmersinsurance.com' identified by 'password' ;
make sure you can connect
mysql -u ambari -ppassword -h host
FALBDCDQ0001V is not the correct MySQL host .. it should talk to FALBDCDQ0007V where i have all the permissions set for ambari user ..
as i stated in the begining, the problem is with the ambari server trying to connect to the local mysql host when i configured it to talk to remote MySQL host ..
Ambari Server setup ran fine .. but when i try to restart it is failing because it is trying to talk to the local db instead of remote mysql db ..
I removed ambari-server binaries from the host using "yum remove ambari-server" and re-installed it using "yum install ambari-server" and ran the set up once again to point it to remote mysql db but it is still trying to talk to the local db when i tried to start using "ambari-server start" command ..