Srikanth Janardhan created AMBARI-23274: -------------------------------------------
Summary: Database script issue when running MYSQL DDL scripts Key: AMBARI-23274 URL: https://issues.apache.org/jira/browse/AMBARI-23274 Project: Ambari Issue Type: Bug Components: ambari-server Affects Versions: 2.7.0 Reporter: Srikanth Janardhan Assignee: Srikanth Janardhan Fix For: 2.7.0 running the [script|https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql] on MySQL, leads to error where user_authentication table is not present. With this user cannot login to Ambari {code:bash} mysql> CREATE TABLE user_authentication ( -> user_authentication_id INTEGER, -> user_id INTEGER NOT NULL, -> authentication_type VARCHAR(50) NOT NULL, -> authentication_key TEXT, -> create_time TIMESTAMP NOT NULL DEFAULT 0, -> update_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -> CONSTRAINT PK_user_authentication PRIMARY KEY (user_authentication_id), -> CONSTRAINT FK_user_authentication_users FOREIGN KEY (user_id) REFERENCES users (user_id) -> ); ERROR 1067 (42000): Invalid default value for 'create_time' {code} This is because the DEFAULT value is set to 0 for 'create_time' field. Fix: Setting the DEFAULT to {{CURRENT_TIMESTAMP}} -- This message was sent by Atlassian JIRA (v7.6.3#76005)