Support Questions

Find answers, ask questions, and share your expertise

Issue while executing sql script Ambari-DDL-MySQL-CREATE.sql for ambari-setup

avatar
Contributor

Hi All,

i am executing Ambari-DDL-MySQL-CREATE.sql before ambari-setup and getting below issue in sql script.

CREATE TABLE members ( member_id INTEGER, group_id INTEGER NOT NULL, user_id INTEGER NOT NULL, CONSTRAINT PK_members PRIMARY KEY (member_id), CONSTRAINT FK_members_group_id FOREIGN KEY (group_id) REFERENCES groups (group_id), CONSTRAINT FK_members_user_id FOREIGN KEY (user_id) REFERENCES users (user_id), CONSTRAINT UNQ_members_0 UNIQUE (group_id, user_id));

Thanks in Advance.

1 ACCEPTED SOLUTION

avatar
Master Mentor

@Amit Mishra

Looks like forgot to attach the exact error which you are getting.
Can you please share the exact error trace that you are getting.
Also please let us know your exact ambari server version.

.

Also please check once if you have followed the instructions mentioned in the following doc: https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.2.0/bk_ambari-administration/content/using_amba...

Specially the following for importing the DB Schema:

# mysql -u <AMBARIUSER> -p
Enter Password: <AMBARIUSER_PASSWORD>

mysql> CREATE DATABASE <AMBARIDATABASE>;
mysql> USE <AMBARIDATABASE>;
mysql> SOURCE Ambari-DDL-MySQL-CREATE.sql;

.

The Ambari-DDL-MySQL-CREATE.sql is present inside the "/var/lib/ambari-server/resources/" location.

View solution in original post

1 REPLY 1

avatar
Master Mentor

@Amit Mishra

Looks like forgot to attach the exact error which you are getting.
Can you please share the exact error trace that you are getting.
Also please let us know your exact ambari server version.

.

Also please check once if you have followed the instructions mentioned in the following doc: https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.2.0/bk_ambari-administration/content/using_amba...

Specially the following for importing the DB Schema:

# mysql -u <AMBARIUSER> -p
Enter Password: <AMBARIUSER_PASSWORD>

mysql> CREATE DATABASE <AMBARIDATABASE>;
mysql> USE <AMBARIDATABASE>;
mysql> SOURCE Ambari-DDL-MySQL-CREATE.sql;

.

The Ambari-DDL-MySQL-CREATE.sql is present inside the "/var/lib/ambari-server/resources/" location.