Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-4125

Ambari MySQL should not configure schema automatically

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.3
    • 1.4.3
    • ambari-agent
    • None

    Description

      STR:
      1. Install and start MySQL server on first host of cluster.
      2. Create MySQL DB:

      mysql -u root
      CREATE DATABASE testdb;
      quit
      

      3. Create user and grant all privileges to him:

      mysql -u root
      CREATE USER 'someuser'@'localhost' IDENTIFIED BY 'somepassword';
      GRANT ALL PRIVILEGES ON *.* TO 'someuser'@'localhost';
      FLUSH PRIVILEGES;
      quit
      

      4. Install Ambari server.
      5. Install mysql-connector-java.
      6. Perform ambari-server setup.

      During setup, when user selects...

      • Advanced database configuration = y
      • Option 3 for MySQL
      • After entering host, port, schema, user, password, ambari setup should validate those entries by connecting to the mysql database, confirm schema has been created (do NOT create automatically) and then save the connection properties and continue setup

      Actual result:

      [root@c6401 ~]# ambari-server setup
      Using python  /usr/bin/python2.6
      Setup ambari-server
      Checking SELinux...
      SELinux status is 'disabled'
      Ambari-server daemon is configured to run under user 'root'. Change this setting [y/n] (n)? n
      Adjusting ambari-server permissions and ownership...
      Checking iptables...
      Checking JDK...
      JCE Policy archive already exists, using /var/lib/ambari-server/resources/jce_policy-6.zip
      Completing setup...
      Configuring database...
      Enter advanced database configuration [y/n] (n)? y
      ==============================================================================
      Choose one of the following options:
      [1] - PostgreSQL (Embedded)
      [2] - Oracle
      [3] - MySQL
      ==============================================================================
      Enter choice (1): 3
      Hostname (localhost): localhost
      Port (3306): 
      Schema Name (ambari): testdb
      Username (ambari): someuser
      Enter Database Password (bigdata): ***********
      Re-enter password: **********
      Copying JDBC drivers to server resources...
      Configuring remote database connection properties...
      ERROR 1049 (42000) at line 55 in file: '/var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql': Unknown database 'ambari'
      
      ERROR: Database bootstrap failed. Please, provide correct connection properties.
      ERROR: Exiting with exit code 1. Reason: Error while configuring connection properties. Exiting
      

      Attachments

        1. AMBARI-4125_trunk.patch
          19 kB
          Vitaly Brodetskyi
        2. AMBARI-4125_branch-1.4.3.patch
          2 kB
          Vitaly Brodetskyi
        3. AMBARI-4125_branch-1.4.3_part2.patch
          13 kB
          Vitaly Brodetskyi

        Activity

          People

            vbrodetskyi Vitaly Brodetskyi
            vbrodetskyi Vitaly Brodetskyi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: