Support Questions

Find answers, ask questions, and share your expertise

Can one use a single database server for hosting Ambari database for multiple clusters?

avatar
Master Mentor

Picture a scenario where you have one MySQL database server and I'd like to run two Ambari managed clusters. Would name collision occur if 2nd cluster tried to create a database on the same server? Can you use a different name for Ambari database?

1 ACCEPTED SOLUTION

avatar

@Artem Ervits

This can definitely be done, but you'll need a different "database" (MySQL parlance) or "schema" (Oracle, DB2 parlance) for each Ambari cluster. For example, you might create an "ambari-Prod1" database or schema for the Prod1 HDP cluster and an "ambari-Test2" database/schema for the Test2 HDP cluster.

View solution in original post

5 REPLIES 5

avatar

@Artem Ervits

This can definitely be done, but you'll need a different "database" (MySQL parlance) or "schema" (Oracle, DB2 parlance) for each Ambari cluster. For example, you might create an "ambari-Prod1" database or schema for the Prod1 HDP cluster and an "ambari-Test2" database/schema for the Test2 HDP cluster.

avatar
Master Mentor

thanks, I'm going to test this right now. Stay tuned for your 10 points :).

avatar
Contributor

+1. You need a different database for each Ambari server. These databases can be on the same SQL server. All that Ambari requires is a connection string.

avatar
Master Mentor

It's turning out more time consuming than I thought. Two things I noticed is first, you cannot have upper case letters in database name and second, after you run setup, it asks you to run a SQL file with schema DDL, in case of Postgres, it always asks to run EMBEDDED DDL SQL which doesn't work. Still struggling with this use case. @emaxwell @Nahappan Somasundaram

avatar
Rising Star

@Artem Ervits This is a long standing bug in Ambari setup. For an external Postgres database the script is:

Ambari-DDL-Postgres-CREATE.sql