Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Problem setup ambari 2.7.1.0 with mysql 8.0.13

avatar
New Contributor

when i exec mysql> source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql;

then i found one table cannot be created in mysql 8.0.3

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));

error:

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups ( group_id INTEGER, principal_id BIGINT NOT NULL, group_name VARCHA' at line 1 ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups (group_id), CONSTRAINT FK_members_user_id FOREIGN KEY (user_id) REFEREN' at line 6

please tell me how should i change the syntax,thanks

1 ACCEPTED SOLUTION

avatar
Master Mentor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
4 REPLIES 4

avatar
Master Mentor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar
New Contributor

thanks for replying,i will change the version

avatar
New Contributor

yes, i have also met similar problem with ambari 2.7.3. the reason is that in mysql8.0, "groups" has been a keyword.

i modified the sql script to create the table not calling "groups", and then change it back to "groups" manully in mysql.

however, in ambari, I can't use the group management function. I think I should modify the sql statements about "groups" in ambari, but i can't find it

hope the new version will fix it

avatar

Windows 10 comes with various features and settings. When the sync your settings are turned on, it tracks the settings that users take into account and set them for further use on any window 10 device.